openai_struct/models/function_object.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#[derive(Debug, Serialize, Deserialize)]
15pub struct FunctionObject {
16 #[serde(rename = "parameters")]
17 pub parameters: Option<crate::models::FunctionParameters>,
18 /// A description of what the function does, used by the model to choose when and how to call the function.
19 #[serde(rename = "description")]
20 pub description: Option<String>,
21 /// The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
22 #[serde(rename = "name")]
23 pub name: String,
24 /// Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).
25 #[serde(rename = "strict")]
26 pub strict: Option<bool>,
27}