修复ollama回答问题保存消息类型错误

This commit is contained in:
junleea 2025-04-10 15:27:56 +08:00
parent 30b5069f9f
commit d17facf9f8
1 changed files with 1 additions and 1 deletions

View File

@ -234,7 +234,7 @@ func ReceiveOllamaSessionV2(modelParam proto.ModelParam, imCtx *proto.IMParamCon
SessionContextMap[imCtx.SessionID] = actx SessionContextMap[imCtx.SessionID] = actx
log.Println("actx has save:", len(SessionContextMap[imCtx.SessionID])) log.Println("actx has save:", len(SessionContextMap[imCtx.SessionID]))
//创建消息 //创建消息
err2, msgID := CreateMessage(proto.UserToModelMsgType, imCtx.SessionID, imCtx.ModelID, imCtx.UserID, robotMsg, 1, imCtx.FunctionID) //机器人id为2,消息类型为2,状态为1 err2, msgID := CreateMessage(proto.ModelToUserMsgType, imCtx.SessionID, imCtx.ModelID, imCtx.UserID, robotMsg, 1, imCtx.FunctionID) //机器人id为2,消息类型为2,状态为1
if err2 != nil { if err2 != nil {
log.Println("create robot message error:", err2) log.Println("create robot message error:", err2)
} }