openai_struct/models/body.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 Body {
16 /// The time frame within which the batch should be processed. Currently only `24h` is supported.
17 #[serde(rename = "completion_window")]
18 pub completion_window: String,
19 /// The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.
20 #[serde(rename = "endpoint")]
21 pub endpoint: String,
22 /// The ID of an uploaded file that contains requests for the new batch. See [upload file](/docs/api-reference/files/create) for how to upload a file. Your input file must be formatted as a [JSONL file](/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size.
23 #[serde(rename = "input_file_id")]
24 pub input_file_id: String,
25 #[serde(rename = "metadata")]
26 pub metadata: Option<crate::models::Metadata>,
27}