refactor: refactor chat_handler, add support for Azure and ChatGLM

This commit is contained in:
RockYang
2023-09-04 06:43:15 +08:00
parent 71562ab0e5
commit 59ed8c9660
34 changed files with 1212 additions and 513 deletions

View File

@@ -1,5 +1,7 @@
package model
import "gorm.io/gorm"
type HistoryMessage struct {
BaseModel
ChatId string // 会话 ID
@@ -10,6 +12,7 @@ type HistoryMessage struct {
Tokens int
Content string
UseContext bool // 是否可以作为聊天上下文
DeletedAt gorm.DeletedAt
}
func (HistoryMessage) TableName() string {