refactor: 更改 OpenAI 请求 Body 数据结构,兼容函数调用请求

This commit is contained in:
RockYang
2023-07-15 18:00:40 +08:00
parent 9806d5ff4c
commit 9126cfff20
11 changed files with 335 additions and 214 deletions

View File

@@ -2,13 +2,14 @@ package model
type HistoryMessage struct {
BaseModel
ChatId string // 会话 ID
UserId uint // 用户 ID
RoleId uint // 角色 ID
Type string
Icon string
Tokens int
Content string
ChatId string // 会话 ID
UserId uint // 用户 ID
RoleId uint // 角色 ID
Type string
Icon string
Tokens int
Content string
UseContext bool // 是否可以作为聊天上下文
}
func (HistoryMessage) TableName() string {