完善 SSE 功能

This commit is contained in:
RockYang
2025-05-27 08:16:02 +08:00
parent 41e4b1c7ac
commit e685876cc0
7 changed files with 487 additions and 547 deletions

View File

@@ -52,17 +52,6 @@ type Delta struct {
} `json:"function_call,omitempty"`
}
// ChatSession 聊天会话对象
type ChatSession struct {
UserId uint `json:"user_id"`
ClientIP string `json:"client_ip"` // 客户端 IP
ChatId string `json:"chat_id"` // 客户端聊天会话 ID, 多会话模式专用字段
Model ChatModel `json:"model"` // GPT 模型
Start int64 `json:"start"` // 开始请求时间戳
Tools []int `json:"tools"` // 工具函数列表
Stream bool `json:"stream"` // 是否采用流式输出
}
type ChatModel struct {
Id uint `json:"id"`
Name string `json:"name"`