mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-07 17:53:42 +08:00
feat: add model field for chat_item and and chat_history data table
This commit is contained in:
@@ -198,6 +198,7 @@ func (h *ChatHandler) sendXunFeiMessage(
|
||||
Content: template.HTMLEscapeString(prompt),
|
||||
Tokens: promptToken,
|
||||
UseContext: true,
|
||||
Model: req.Model,
|
||||
}
|
||||
historyUserMsg.CreatedAt = promptCreatedAt
|
||||
historyUserMsg.UpdatedAt = promptCreatedAt
|
||||
@@ -219,6 +220,7 @@ func (h *ChatHandler) sendXunFeiMessage(
|
||||
Content: message.Content,
|
||||
Tokens: totalTokens,
|
||||
UseContext: true,
|
||||
Model: req.Model,
|
||||
}
|
||||
historyReplyMsg.CreatedAt = replyCreatedAt
|
||||
historyReplyMsg.UpdatedAt = replyCreatedAt
|
||||
@@ -243,6 +245,7 @@ func (h *ChatHandler) sendXunFeiMessage(
|
||||
} else {
|
||||
chatItem.Title = prompt
|
||||
}
|
||||
chatItem.Model = req.Model
|
||||
h.db.Create(&chatItem)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user