mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-30 12:39:27 +08:00
Go: update chat URL (#14453)
### What problem does this PR solve? Update the URL to: /api/v1/chat/completions ### Type of change - [x] Refactoring Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -1483,13 +1483,15 @@ func (c *RAGFlowClient) ChatToModel(cmd *Command) (ResponseIf, error) {
|
||||
effort := cmd.Params["effort"].(string)
|
||||
verbosity := cmd.Params["verbosity"].(string)
|
||||
|
||||
url := fmt.Sprintf("/providers/%s/instances/%s/models", providerName, instanceName)
|
||||
url := fmt.Sprintf("/chat/completions")
|
||||
|
||||
payload := map[string]interface{}{
|
||||
"model_name": modelName,
|
||||
"message": message,
|
||||
"stream": stream, // use stream API
|
||||
"thinking": thinking,
|
||||
"provider_name": providerName,
|
||||
"instance_name": instanceName,
|
||||
"model_name": modelName,
|
||||
"message": message,
|
||||
"stream": stream, // use stream API
|
||||
"thinking": thinking,
|
||||
}
|
||||
|
||||
if thinking {
|
||||
|
||||
Reference in New Issue
Block a user