Build a fake Batch object matching openai.types.Batch shape.
(
status: str = "in_progress",
completed: int = 0,
failed: int = 0,
total: int = 10,
input_file_id: str | None = None,
output_file_id: str | None = None,
error_file_id: str | None = None,
)
| 22 | |
| 23 | |
| 24 | def _make_batch( |
| 25 | status: str = "in_progress", |
| 26 | completed: int = 0, |
| 27 | failed: int = 0, |
| 28 | total: int = 10, |
| 29 | input_file_id: str | None = None, |
| 30 | output_file_id: str | None = None, |
| 31 | error_file_id: str | None = None, |
| 32 | ) -> SimpleNamespace: |
| 33 | """Build a fake Batch object matching openai.types.Batch shape.""" |
| 34 | return SimpleNamespace( |
| 35 | status=status, |
| 36 | request_counts=SimpleNamespace( |
| 37 | completed=completed, |
| 38 | failed=failed, |
| 39 | total=total, |
| 40 | ), |
| 41 | input_file_id=input_file_id, |
| 42 | output_file_id=output_file_id, |
| 43 | usage=None, |
| 44 | error_file_id=error_file_id, |
| 45 | ) |
| 46 | |
| 47 | |
| 48 | @patch("explainshell.extraction.llm.providers.openai.OpenAI") |
no outgoing calls
no test coverage detected