Skip to content

Commit 6fdf15c

Browse files
authored
feat: spec sync: new tools apply_patch and shell (#475)
* update responses + batch types * updated spec
1 parent 39a51c0 commit 6fdf15c

File tree

4 files changed

+1144
-31
lines changed

4 files changed

+1144
-31
lines changed

async-openai/src/types/batches/batch.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ pub struct BatchRequest {
2121
/// 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.
2222
pub input_file_id: String,
2323

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

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

5055
#[derive(Debug, Clone, PartialEq, Serialize, Default, Deserialize)]
@@ -181,7 +186,8 @@ pub struct BatchRequestInput {
181186
pub custom_id: String,
182187
/// The HTTP method to be used for the request. Currently only `POST` is supported.
183188
pub method: BatchRequestInputMethod,
184-
/// The OpenAI API relative URL to be used for the request. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.
189+
/// The OpenAI API relative URL to be used for the request. Currently `/v1/responses`,
190+
/// `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, and `/v1/moderations` are supported.
185191
pub url: BatchEndpoint,
186192
pub body: Option<serde_json::Value>,
187193
}

async-openai/src/types/chat/chat_types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,7 @@ pub enum ServiceTier {
774774
#[derive(Clone, Serialize, Debug, Deserialize, PartialEq, Default)]
775775
#[serde(rename_all = "lowercase")]
776776
pub enum ReasoningEffort {
777+
None,
777778
Minimal,
778779
Low,
779780
#[default]

0 commit comments

Comments
 (0)