fix bug: free model not record the chat history

This commit is contained in:
RockYang
2024-06-06 15:01:32 +08:00
parent c02661ea29
commit b8de15d66e
7 changed files with 41 additions and 29 deletions

View File

@@ -142,7 +142,7 @@ func (h *ChatHandler) sendOpenAiMessage(
}
if toolCall { // 调用函数完成任务
var params map[string]interface{}
params := make(map[string]interface{})
_ = utils.JsonDecode(strings.Join(arguments, ""), &params)
logger.Debugf("函数名称: %s, 函数参数:%s", function.Name, params)
params["user_id"] = userVo.Id