We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7d2a62 commit 9d312f0Copy full SHA for 9d312f0
packages/agent/src/core/llm/providers/anthropic.ts
@@ -79,11 +79,16 @@ export class AnthropicProvider implements LLMProvider {
79
80
// Add tools if provided
81
if (functions && functions.length > 0) {
82
- (requestOptions as any).tools = functions.map(fn => ({
83
- name: fn.name,
84
- description: fn.description,
85
- input_schema: fn.parameters,
+ const tools = functions.map(fn => ({
+ type: 'function',
+ function: {
+ name: fn.name,
86
+ description: fn.description,
87
+ parameters: fn.parameters,
88
+ }
89
}));
90
+ console.log('Tools for Anthropic:', JSON.stringify(tools, null, 2));
91
+ (requestOptions as any).tools = tools;
92
}
93
94
const response = await this.client.messages.create(requestOptions);
0 commit comments