openai_struct/models/
assistants_api_tool_choice_option.rs

1/*
2 * OpenAI API
3 *
4 * The OpenAI REST API. Please see pub https://platform.openai.com/docs/api-reference for more details.
5 *
6 * OpenAPI spec pub version: 2.3.0
7 *
8 * Generated pub by: https://github.com/swagger-api/swagger-codegen.git
9 */
10
11/// pub AssistantsApiToolChoiceOption : Controls which (if any) tool is called by the model. `none` means the model will not call any tools and instead generates a message. `auto` is the default value and means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools before responding to the user. Specifying a particular tool like `{\"type\": \"file_search\"}` or `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16/// # on openapi.yaml
17///
18/// ```yaml
19/// AssistantsApiToolChoiceOption:
20///   description: >
21///     Controls which (if any) tool is called by the model.
22///
23///     `none` means the model will not call any tools and instead generates a
24///     message.
25///
26///     `auto` is the default value and means the model can pick between
27///     generating a message or calling one or more tools.
28///
29///     `required` means the model must call one or more tools before responding
30///     to the user.
31///
32///     Specifying a particular tool like `{"type": "file_search"}` or `{"type":
33///     "function", "function": {"name": "my_function"}}` forces the model to
34///     call that tool.
35///   oneOf:
36///     - type: string
37///       description: >
38///         `none` means the model will not call any tools and instead generates
39///         a message. `auto` means the model can pick between generating a
40///         message or calling one or more tools. `required` means the model
41///         must call one or more tools before responding to the user.
42///       enum:
43///         - none
44///         - auto
45///         - required
46///     - $ref: "#/components/schemas/AssistantsNamedToolChoice"
47/// ```
48#[derive(Debug, Clone, Serialize, Deserialize)]
49#[serde(rename_all = "kebab-case")]
50pub enum AssistantsApiToolChoiceOption {
51    #[serde(rename = "none")]
52    None,
53    #[serde(rename = "auto")]
54    Auto,
55    #[serde(rename = "required")]
56    Required,
57}