openai_struct/models/
chat_completion_message_tool_call_chunk.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#[allow(unused_imports)]
12use serde_json::Value;
13
14/// # on openapi.yaml
15///
16/// ```yaml
17/// ChatCompletionMessageToolCallChunk:
18///   type: object
19///   properties:
20///     index:
21///       type: integer
22///     id:
23///       type: string
24///       description: The ID of the tool call.
25///     type:
26///       type: string
27///       enum:
28///         - function
29///       description: The type of the tool. Currently, only `function` is supported.
30///       x-stainless-const: true
31///     function:
32///       type: object
33///       properties:
34///         name:
35///           type: string
36///           description: The name of the function to call.
37///         arguments:
38///           type: string
39///           description:
40///             The arguments to call the function with, as generated by the model
41///             in JSON format. Note that the model does not always generate
42///             valid JSON, and may hallucinate parameters not defined by your
43///             function schema. Validate the arguments in your code before
44///             calling your function.
45///   required:
46///     - index
47/// ```
48#[derive(Debug, Serialize, Deserialize)]
49pub struct ChatCompletionMessageToolCallChunk {
50    #[serde(rename = "function")]
51    pub function: Option<crate::models::ChatCompletionMessageToolCallChunkFunction>,
52    /// The ID of the tool call.
53    #[serde(rename = "id")]
54    pub id: Option<String>,
55    #[serde(rename = "index")]
56    pub index: i32,
57    /// The type of the tool. Currently, only `function` is supported.
58    #[serde(rename = "type")]
59    pub _type: Option<String>,
60}