genkit icon indicating copy to clipboard operation
genkit copied to clipboard

[FR] Support forced tool calling

Open lfkellogg opened this issue 8 months ago • 2 comments

Is your feature request related to a problem? Please describe. The Gemini API supports setting a "mode" for function calling: https://ai.google.dev/gemini-api/docs/function-calling#function_calling_mode

For example this allows the developer to choose whether the LLM output should only contain function calls, or if the LLM should decide whether to return text or a function call.

The googleai plugin currently does not support tool_config. This should be added to the custom model config.

Describe the solution you'd like The mode could be specified during the generate() call.

Describe alternatives you've considered N/A

Additional context N/A

lfkellogg avatar Jun 07 '24 20:06 lfkellogg