ai icon indicating copy to clipboard operation
ai copied to clipboard

Add tool_choice prop to render

Open hinderberg opened this issue 2 years ago • 2 comments

Feature Description

Render does not have the tool_choice prop available, making forcing a specific tool of choice impossible, making all calls using auto which is the default.

Use Case

Forcing the model to call a specific tool constantly and ensuring the tool is called every time. It works better than trying to force it through a prompt.

Additional context

No response

hinderberg avatar Mar 30 '24 07:03 hinderberg

Would love this too

someguy9 avatar May 14 '24 00:05 someguy9

Forcing the model to call a specific tool constantly and ensuring the tool is called every time.

Please check out generateObject and streamObject:

https://sdk.vercel.ai/docs/ai-sdk-core/generating-structured-data

Would they work for your use case?

lgrammel avatar May 15 '24 15:05 lgrammel

@lgrammel thanks, this can't be used with multiple tools though, right?

gdaybrice avatar May 15 '24 21:05 gdaybrice