You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
toolTest: {
description: 'Test tool - use this if the user asks to test the tools',
parameters: z.object({}),
execute: async () => {
console.log('Test tool executed')
return { message: 'Test tool executed' }
},
},
}
Then use a prompt such as "test the tools" and observe the console log and the model will respond acknowledging the test.
WORKS when using an OpenAI model such as openai('gpt-4o')
WORKS when using a Google Gen AI model such as google('gemini-1.5-pro-latest')
DOES NOT WORK when using a Google Gen AI model AND { useSearchGrounding: true } option
Code example
const result = await ai({
model: google('gemini-1.5-pro-latest', {
useSearchGrounding: true,
}),
//model: openai('gpt-4o'),
prompt: "test the tools"
tools: {
toolTest: {
description: 'Test tool - use this if the user asks to test the tools',
parameters: z.object({}),
execute: async () => {
console.log('Test tool executed')
return { message: 'Test tool executed' }
},
},
}),
maxToolRoundtrips: 3,
temperature: 0.85,
maxSteps: 3,
})
AI provider
google('gemini-1.5-pro-latest')
Additional context
No response
The text was updated successfully, but these errors were encountered:
Description
Use a basic tool, such as
Then use a prompt such as "test the tools" and observe the console log and the model will respond acknowledging the test.
openai('gpt-4o')
google('gemini-1.5-pro-latest')
{ useSearchGrounding: true }
optionCode example
AI provider
google('gemini-1.5-pro-latest')
Additional context
No response
The text was updated successfully, but these errors were encountered: