(
self,
model: str,
file_url: str,
optional_payload: dict,
page_ranges: Optional[str] = None,
batch_id: Optional[str] = None,
)
| 78 | return headers |
| 79 | |
| 80 | async def submit_url( |
| 81 | self, |
| 82 | model: str, |
| 83 | file_url: str, |
| 84 | optional_payload: dict, |
| 85 | page_ranges: Optional[str] = None, |
| 86 | batch_id: Optional[str] = None, |
| 87 | ) -> str: |
| 88 | body = { |
| 89 | "fileUrl": file_url, |
| 90 | "model": model, |
| 91 | "optionalPayload": optional_payload, |
| 92 | } |
| 93 | if page_ranges is not None: |
| 94 | body["pageRanges"] = page_ranges |
| 95 | if batch_id is not None: |
| 96 | body["batchId"] = batch_id |
| 97 | |
| 98 | await self._ensure_session() |
| 99 | async with self._session.post( |
| 100 | self._jobs_url, |
| 101 | json=body, |
| 102 | headers={"Content-Type": "application/json"}, |
| 103 | ) as resp: |
| 104 | await self._raise_for_response(resp) |
| 105 | data = await self._response_data(resp) |
| 106 | return extract_job_id(data) |
| 107 | |
| 108 | async def submit_file( |
| 109 | self, |
nothing calls this directly
no test coverage detected