mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-08-24 20:02:59 +02:00
Add files via upload
This commit is contained in:
@@ -597,6 +597,13 @@ func chatToolCallsToSchema(tcs []agent.ToolCall) []schema.ToolCall {
|
|||||||
argsStr = string(b)
|
argsStr = string(b)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Some OpenAI-compatible gateways require `function.arguments` to exist
|
||||||
|
// on every assistant tool_call message. When args are empty, omitempty may
|
||||||
|
// drop the field during serialization and cause "missing field arguments"
|
||||||
|
// on the next turn history replay.
|
||||||
|
if strings.TrimSpace(argsStr) == "" {
|
||||||
|
argsStr = "{}"
|
||||||
|
}
|
||||||
typ := tc.Type
|
typ := tc.Type
|
||||||
if typ == "" {
|
if typ == "" {
|
||||||
typ = "function"
|
typ = "function"
|
||||||
|
|||||||
Reference in New Issue
Block a user