Status information about a batch job.
| 86 | |
| 87 | @dataclass |
| 88 | class BatchJobInfo: |
| 89 | """Status information about a batch job.""" |
| 90 | |
| 91 | batch_id: str |
| 92 | """The OpenAI batch ID.""" |
| 93 | |
| 94 | status: str |
| 95 | """Current status: validating, in_progress, completed, failed, expired, etc.""" |
| 96 | |
| 97 | total_requests: int = 0 |
| 98 | """Total number of requests in the batch.""" |
| 99 | |
| 100 | completed_requests: int = 0 |
| 101 | """Number of completed requests.""" |
| 102 | |
| 103 | failed_requests: int = 0 |
| 104 | """Number of failed requests.""" |
| 105 | |
| 106 | output_file_id: Optional[str] = None |
| 107 | """ID of the output file when batch completes.""" |
| 108 | |
| 109 | error_file_id: Optional[str] = None |
| 110 | """ID of the error file if there are errors.""" |
| 111 | |
| 112 | |
| 113 | def create_batch( |
no outgoing calls