feat: 添加支持阿里的通义千问对话

This commit is contained in:
whale_fall
2024-01-19 09:52:16 +08:00
parent a89ff72308
commit 9ca97bf4bc
6 changed files with 258 additions and 5 deletions

View File

@@ -12,6 +12,9 @@ type ApiRequest struct {
Functions []interface{} `json:"functions,omitempty"` // 兼容中转平台
ToolChoice string `json:"tool_choice,omitempty"`
Input map[string]interface{} `json:"input,omitempty"` //兼容阿里通义千问
Parameters map[string]interface{} `json:"parameters,omitempty"` //兼容阿里通义千问
}
type Message struct {

View File

@@ -148,6 +148,7 @@ const Azure = Platform("Azure")
const ChatGLM = Platform("ChatGLM")
const Baidu = Platform("Baidu")
const XunFei = Platform("XunFei")
const Ali = Platform("Ali")
// UserChatConfig 用户的聊天配置
type UserChatConfig struct {