feat: allow user to set custom api keys for different platforms

This commit is contained in:
RockYang
2023-09-04 17:34:29 +08:00
parent f7a427d2c0
commit 2820adad53
11 changed files with 76 additions and 68 deletions

View File

@@ -113,11 +113,11 @@ type Platform string
const OpenAI = Platform("OpenAI")
const Azure = Platform("Azure")
const ChatGML = Platform("ChatGML")
const ChatGLM = Platform("ChatGLM")
// UserChatConfig 用户的聊天配置
type UserChatConfig struct {
ApiKeys map[Platform]string
ApiKeys map[Platform]string `json:"api_keys"`
}
type ModelAPIConfig struct {