1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* OpenAI API
*
* The OpenAI REST API. Please see pub https:///platform.openai.com/docs/api-reference for more details.
*
* OpenAPI spec pub version: 2.3.0
*
* Generated pub by: https:///github.com/swagger-api/swagger-codegen.git
*/
/// pub BatchRequestInput : The per-line object of the batch input file
#[allow(unused_imports)]
use serde_json::Value;
/// # on openapi.yaml
///
/// ```yaml
/// BatchRequestInput:
/// type: object
/// description: The per-line object of the batch input file
/// properties:
/// custom_id:
/// type: string
/// description:
/// A developer-provided per-request id that will be used to match
/// outputs to inputs. Must be unique for each request in a batch.
/// method:
/// type: string
/// enum:
/// - POST
/// description:
/// The HTTP method to be used for the request. Currently only `POST`
/// is supported.
/// x-stainless-const: true
/// url:
/// type: string
/// description:
/// The OpenAI API relative URL to be used for the request. Currently
/// `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are
/// supported.
/// x-oaiMeta:
/// name: The request input object
/// example: >
/// {"custom_id": "request-1", "method": "POST", "url":
/// "/v1/chat/completions", "body": {"model": "gpt-4o-mini", "messages":
/// [{"role": "system", "content": "You are a helpful assistant."},
/// {"role": "user", "content": "What is 2+2?"}]}}
/// ```
#[derive(Debug, Serialize, Deserialize)]
pub struct BatchRequestInput {
/// A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.
#[serde(rename = "custom_id")]
pub custom_id: Option<String>,
/// The HTTP method to be used for the request. Currently only `POST` is supported.
#[serde(rename = "method")]
pub method: Option<String>,
/// The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.
#[serde(rename = "url")]
pub url: Option<String>,
}