Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions async-openai/src/types/batches/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ pub struct BatchRequest {
/// Your input file must be formatted as a [JSONL file](https://platform.openai.com/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.
pub input_file_id: String,

/// 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.
/// The endpoint to be used for all requests in the batch. Currently `/v1/responses`,
/// `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, and `/v1/moderations` are
/// supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000
/// embedding inputs across all requests in the batch.
pub endpoint: BatchEndpoint,

/// The time frame within which the batch should be processed. Currently only `24h` is supported.
Expand All @@ -45,6 +48,8 @@ pub enum BatchEndpoint {
V1Embeddings,
#[serde(rename = "/v1/completions")]
V1Completions,
#[serde(rename = "/v1/moderations")]
V1Moderations,
}

#[derive(Debug, Clone, PartialEq, Serialize, Default, Deserialize)]
Expand Down Expand Up @@ -181,7 +186,8 @@ pub struct BatchRequestInput {
pub custom_id: String,
/// The HTTP method to be used for the request. Currently only `POST` is supported.
pub method: BatchRequestInputMethod,
/// The OpenAI API relative URL to be used for the request. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.
/// The OpenAI API relative URL to be used for the request. Currently `/v1/responses`,
/// `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, and `/v1/moderations` are supported.
pub url: BatchEndpoint,
pub body: Option<serde_json::Value>,
}
Expand Down
1 change: 1 addition & 0 deletions async-openai/src/types/chat/chat_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ pub enum ServiceTier {
#[derive(Clone, Serialize, Debug, Deserialize, PartialEq, Default)]
#[serde(rename_all = "lowercase")]
pub enum ReasoningEffort {
None,
Minimal,
Low,
#[default]
Expand Down
Loading
Loading