mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 08:23:34 +00:00
Fix tool calls with empty arguments
This commit is contained in:
1 file changed
+7
@@ -340,6 +340,13 @@ export class SessionManager {
|
||||
}
|
||||
}
|
||||
|
||||
// Fix tool calls with empty arguments
|
||||
for (const toolCall of accumulatedToolCalls) {
|
||||
if (toolCall.type === 'function') {
|
||||
toolCall.function.arguments = toolCall.function.arguments || '{}';
|
||||
}
|
||||
}
|
||||
|
||||
// Create final assistant message
|
||||
const assistantMessage: AIMessage = {
|
||||
role: 'assistant',
|
||||
|
||||
Reference in new issue
Block a user