class _TemporalApiClient(BaseApiClient): (source)
Constructor: _TemporalApiClient(vertexai, project, location, activity_config, ...)
A BaseApiClient that routes all API calls through Temporal activities.
This client is used on the workflow side. It does NOT initialize HTTP clients, load credentials, or make any network calls. It only holds the minimal configuration needed for the SDK's request formatting logic (e.g., choosing between Vertex AI and ML Dev parameter transformations).
All actual HTTP calls are dispatched via workflow.execute_activity.
| Method | __del__ |
No-op — no HTTP resources to clean up. |
| Method | __init__ |
Initialize without calling super (no HTTP clients needed). |
| Async Method | aclose |
No-op — no HTTP resources to close. |
| Async Method | async |
Raise — use client.files.download() instead. |
| Async Method | async |
Dispatch an async API request through a Temporal activity. |
| Async Method | async |
Dispatch a streamed request, batching chunks in the activity. |
| Async Method | async |
Raise — use client.files.upload() instead. |
| Method | close |
No-op — no HTTP resources to close. |
| Method | download |
Raise — use client.files.download() instead. |
| Method | request |
Raise — sync requests not supported in workflows. |
| Method | request |
Raise — sync streaming not supported in workflows. |
| Method | upload |
Raise — use client.files.upload() instead. |
| Instance Variable | api |
Undocumented |
| Instance Variable | custom |
Undocumented |
| Instance Variable | location |
Undocumented |
| Instance Variable | project |
Undocumented |
| Instance Variable | vertexai |
Undocumented |
| Static Method | _process |
Validate and extract serializable per-request HTTP options. |
| Method | _require |
Fail fast if streaming is configured but no WorkflowStream is hosted. |
| Method | _verify |
No-op — matches the base implementation. |
| Instance Variable | _activity |
Undocumented |
| Instance Variable | _streaming |
Undocumented |
| Instance Variable | _streaming |
Undocumented |
bool = False, project: str | None = None, location: str | None = None, activity_config: ActivityConfig | None = None, streaming_topic: str | None = None, streaming_batch_interval: timedelta = timedelta(Initialize without calling super (no HTTP clients needed).
str, path: str, request_dict: dict[ str, object], http_options: HttpOptionsOrDict | None = None) -> SdkHttpResponse:
(source)
¶
Dispatch an async API request through a Temporal activity.
str, path: str, request_dict: dict[ str, object], http_options: HttpOptionsOrDict | None = None) -> Any:
(source)
¶
Dispatch a streamed request, batching chunks in the activity.
When a streaming_topic is configured, the activity also publishes each chunk to that workflow-stream topic as it arrives; the workflow must host a WorkflowStream to receive them.
str, path: str, request_dict: dict[ str, object], http_options: HttpOptionsOrDict | None = None) -> SdkHttpResponse:
(source)
¶
Raise — sync requests not supported in workflows.
str, path: str, request_dict: dict[ str, object], http_options: HttpOptionsOrDict | None = None) -> Any:
(source)
¶
Raise — sync streaming not supported in workflows.
HttpOptionsOrDict | None, config: ActivityConfig) -> _SerializableHttpOptions | None:
(source)
¶
Validate and extract serializable per-request HTTP options.
Rejects non-serializable fields (custom HTTP clients), maps timeout to the Temporal activity config, and returns the remaining options for forwarding to the activity.
| Parameters | |
httpHttpOptionsOrDict | None | Per-request options from the SDK call. |
config:ActivityConfig | Mutable activity config dict — timeout is applied here. |
| Returns | |
_SerializableHttpOptions | None | Serializable options to forward, or None if nothing to forward. |
Fail fast if streaming is configured but no WorkflowStream is hosted.
Published chunks are delivered to the workflow's WorkflowStream via a signal; without a registered handler the signals would be silently dropped, so surface a clear error instead.