View Source ExOpenAI.Components.ChatCompletionAllowedTools (ex_openai.ex v2.0.0-beta2)
Constrains the tools available to the model to a pre-defined set.
Fields
:mode- required -:auto | :required
Constrains the tools available to the model to a pre-defined set.
auto allows the model to pick from among the allowed tools and generate a
message.
required requires the model to call one or more of the allowed tools.
Allowed values: "auto", "required"
:tools- required -[map()]
A list of tool definitions that the model should be allowed to call.
For the Chat Completions API, the list of tool definitions might look like:
[
{ "type": "function", "function": { "name": "get_weather" } },
{ "type": "function", "function": { "name": "get_time" } }
]
Summary
Types
@type t() :: %ExOpenAI.Components.ChatCompletionAllowedTools{ mode: :auto | :required, tools: [map()] }