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
//! # Batch Processing Module
//!
//! Provides batch-processing capabilities for the Zhipu AI API. Submit
//! multiple requests asynchronously and retrieve results later — ideal for
//! high-volume or scheduled workloads.
//!
//! # Operations
//!
//! - [`create`] — Create a new batch job
//! - [`list`] — List batch jobs with filtering
//! - [`retrieve`] — Retrieve a batch job's status and results
//! - [`cancel`] — Cancel a running or queued batch job
//!
//! # Batch Lifecycle
//!
//! 1. `Initializing` — Job is being validated
//! 2. `In Progress` — Job is being processed
//! 3. `Completed` — All requests processed successfully
//! 4. `Failed` — Job encountered errors
//! 5. `Cancelled` — Job was cancelled by the user
//! 6. `Expired` — Results expired (default: 24 h)
//!
//! # Usage
//!
//! ```rust,ignore
//! use zai_rs::batches::*;
//!
//! // Create
//! let body = CreateBatchBody { endpoint: BatchEndpoint::ChatCompletions, .. };
//! let job = client.create_batch(&CreateBatchRequest::new(body)).await?;
//!
//! // Retrieve
//! let result = client.retrieve_batch(&BatchesRetrieveRequest::new(&job.id)).await?;
//!
//! // Cancel
//! client.cancel_batch(&CancelBatchRequest::new(&job.id)).await?;
//! ```
// Re-export selected API types for convenient access via `zai_rs::batches::*`
pub use ;
pub use ;
pub use ;
pub use ;
pub use BatchItem;