mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-14 00:01:53 +00:00
fix(ollama): preserve reasoning and tool-call context (#6605)
This commit is contained in:
@@ -58,8 +58,12 @@ func ollamaToolCallsToOpenAI(toolCalls []OllamaToolCall, startIndex int, include
|
||||
argBytes = []byte("{}")
|
||||
}
|
||||
}
|
||||
toolCallID := tc.ID
|
||||
if toolCallID == "" {
|
||||
toolCallID = fmt.Sprintf("call_%d", startIndex)
|
||||
}
|
||||
tr := dto.ToolCallResponse{
|
||||
ID: fmt.Sprintf("call_%d", startIndex),
|
||||
ID: toolCallID,
|
||||
Type: "function",
|
||||
Function: dto.FunctionResponse{
|
||||
Name: tc.Function.Name,
|
||||
|
||||
Reference in New Issue
Block a user