mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Treat AI empty tool call as empty object
This commit is contained in:
1 file changed
+1
-1
@@ -329,7 +329,7 @@ export class SessionManager {
|
||||
try {
|
||||
let toolArgs: unknown;
|
||||
if (tool.inputSchema) {
|
||||
toolArgs = tool.inputSchema.parse(JSON.parse(functionToolCall.function.arguments));
|
||||
toolArgs = tool.inputSchema.parse(JSON.parse(functionToolCall.function.arguments || '{}'));
|
||||
} else {
|
||||
// For tools without inputSchema, use empty object or parsed arguments as-is
|
||||
const rawArgs = functionToolCall.function.arguments;
|
||||
|
||||
Reference in new issue
Block a user