mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-12 04:03:42 +08:00
支持在 Chat 页面显示,隐藏对话列表
This commit is contained in:
@@ -131,7 +131,8 @@ type SystemConfig struct {
|
||||
Title string `json:"title,omitempty"` // 网站标题
|
||||
Slogan string `json:"slogan,omitempty"` // 网站 slogan
|
||||
AdminTitle string `json:"admin_title,omitempty"` // 管理后台标题
|
||||
Logo string `json:"logo,omitempty"` // 方形 Logo
|
||||
Logo string `json:"logo,omitempty"` // 圆形 Logo
|
||||
BarLogo string `json:"bar_logo,omitempty"` // 条形 Logo
|
||||
InitPower int `json:"init_power,omitempty"` // 新用户注册赠送算力值
|
||||
DailyPower int `json:"daily_power,omitempty"` // 每日签到赠送算力
|
||||
InvitePower int `json:"invite_power,omitempty"` // 邀请新用户赠送算力值
|
||||
|
||||
@@ -92,6 +92,8 @@ func (h *ChatHandler) sendOpenAiMessage(
|
||||
|
||||
if strings.HasPrefix(req.Model, "o1-") {
|
||||
content := fmt.Sprintf("AI 思考结束,耗时:%d 秒。\n\n", time.Now().Unix()-session.Start)
|
||||
contents = append(contents, "> AI 正在思考中...\n")
|
||||
contents = append(contents, content)
|
||||
utils.SendChunkMsg(ws, content)
|
||||
}
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@ func (h *WebsocketHandler) Client(c *gin.Context) {
|
||||
if err != nil {
|
||||
logger.Error(err, chatModel)
|
||||
}
|
||||
session.Model.Id = chatModel.Id
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
h.chatHandler.ReqCancelFunc.Put(clientId, cancel)
|
||||
err = h.chatHandler.sendMessage(ctx, session, chatRole, chatMessage.Content, client)
|
||||
|
||||
Reference in New Issue
Block a user