mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-27 02:42:00 +08:00
fix: unable to chat after set model (#16195)
### What problem does this PR solve? ``` fixed: RAGFlow(api/default)> use model 'minimax-m2.5@test@minimax' SUCCESS RAGFlow(api/default)> chat message 'who r u' Answer: Hey! I'm MiniMax-M2.5, an AI assistant here to help you with questions, tasks, or whatever you need. What can I do for you? Time: 1.727263 ``` ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -2830,12 +2830,14 @@ optionsLoop:
|
||||
}
|
||||
cmd := NewCommand("chat_to_model")
|
||||
|
||||
if common.IsCompositeModelName(modelNameOrID) {
|
||||
cmd.Params["composite_model_name"] = modelNameOrID
|
||||
} else if common.IsUUID(modelNameOrID) {
|
||||
cmd.Params["model_id"] = modelNameOrID
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid format of model name or ID: %s", modelNameOrID)
|
||||
if modelNameOrID != "" {
|
||||
if common.IsCompositeModelName(modelNameOrID) {
|
||||
cmd.Params["composite_model_name"] = modelNameOrID
|
||||
} else if common.IsUUID(modelNameOrID) {
|
||||
cmd.Params["model_id"] = modelNameOrID
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid format of model name or ID: %s", modelNameOrID)
|
||||
}
|
||||
}
|
||||
cmd.Params["messages"] = messages
|
||||
cmd.Params["images"] = images
|
||||
|
||||
Reference in New Issue
Block a user