mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-12 04:03:42 +08:00
feat: add model field for chat_item and and chat_history data table
This commit is contained in:
@@ -206,6 +206,7 @@ func (h *ChatHandler) sendOpenAiMessage(
|
||||
Content: template.HTMLEscapeString(prompt),
|
||||
Tokens: promptToken,
|
||||
UseContext: useContext,
|
||||
Model: req.Model,
|
||||
}
|
||||
historyUserMsg.CreatedAt = promptCreatedAt
|
||||
historyUserMsg.UpdatedAt = promptCreatedAt
|
||||
@@ -235,6 +236,7 @@ func (h *ChatHandler) sendOpenAiMessage(
|
||||
Content: message.Content,
|
||||
Tokens: totalTokens,
|
||||
UseContext: useContext,
|
||||
Model: req.Model,
|
||||
}
|
||||
historyReplyMsg.CreatedAt = replyCreatedAt
|
||||
historyReplyMsg.UpdatedAt = replyCreatedAt
|
||||
@@ -260,6 +262,7 @@ func (h *ChatHandler) sendOpenAiMessage(
|
||||
} else {
|
||||
chatItem.Title = prompt
|
||||
}
|
||||
chatItem.Model = req.Model
|
||||
h.db.Create(&chatItem)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user