Send { type: "object" } tool parameters when we don't care about the input

Fixes https://gitlab.com/soapbox-pub/shakespeare/-/issues/60
This commit is contained in:
Alex Gleason committed 2025-10-03 13:04:10 -05:00
1 parent 388afd0b16
commit a4c0498e5b
1 file changed
+1 -1
+1 -1
View File
@@ -17,7 +17,7 @@ export function toolToOpenAI<TParams>(name: string, tool: Tool<TParams>): OpenAI
if (tool.inputSchema) {
functionDef.parameters = zodSchemaToJsonSchema(tool.inputSchema);
} else {
functionDef.parameters = {};
functionDef.parameters = { type: "object" };
}
return {