openai_struct/models/function_tool.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 FunctionTool : Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct FunctionTool {
18 #[serde(rename = "parameters")]
19 pub parameters: Value,
20 #[serde(rename = "description")]
21 pub description: Option<Value>,
22 /// The name of the function to call.
23 #[serde(rename = "name")]
24 pub name: String,
25 #[serde(rename = "strict")]
26 pub strict: Value,
27 /// The type of the function tool. Always `function`.
28 #[serde(rename = "type")]
29 pub _type: String,
30}