openai_struct/models/assistant_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/// pub AssistantObject : Represents an `assistant` that can call the model and use tools.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct AssistantObject {
18 /// The Unix timestamp (in seconds) for when the assistant was created.
19 #[serde(rename = "created_at")]
20 pub created_at: i32,
21 /// The description of the assistant. The maximum length is 512 characters.
22 #[serde(rename = "description")]
23 pub description: String,
24 /// The identifier, which can be referenced in API endpoints.
25 #[serde(rename = "id")]
26 pub id: String,
27 /// The system instructions that the assistant uses. The maximum length is 256,000 characters.
28 #[serde(rename = "instructions")]
29 pub instructions: String,
30 #[serde(rename = "metadata")]
31 pub metadata: crate::models::Metadata,
32 /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them.
33 #[serde(rename = "model")]
34 pub model: String,
35 /// The name of the assistant. The maximum length is 256 characters.
36 #[serde(rename = "name")]
37 pub name: String,
38 /// The object type, which is always `assistant`.
39 #[serde(rename = "object")]
40 pub object: String,
41 #[serde(rename = "response_format")]
42 pub response_format: Option<crate::models::AssistantsApiResponseFormatOption>,
43 /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
44 #[serde(rename = "temperature")]
45 pub temperature: Option<f32>,
46 #[serde(rename = "tool_resources")]
47 pub tool_resources: Option<crate::models::AssistantObjectToolResources>,
48 /// A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
49 #[serde(rename = "tools")]
50 pub tools: Vec<Value>,
51 /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.
52 #[serde(rename = "top_p")]
53 pub top_p: Option<f32>,
54}