airflow.providers.openai.triggers.openai¶
Classes¶
Triggers OpenAI Batch API. |
Module Contents¶
- class airflow.providers.openai.triggers.openai.OpenAIBatchTrigger(conn_id, batch_id, poll_interval, end_time=None, timeout=None)[source]¶
Bases:
airflow.triggers.base.BaseTriggerTriggers OpenAI Batch API.
- Parameters:
conn_id (str) – The OpenAI connection ID to use.
batch_id (str) – The ID of the OpenAI batch to wait on.
poll_interval (float) – Seconds between batch status polls.
timeout (float | None) – Total seconds to wait for the batch to reach a terminal state before giving up. This is the preferred way to bound the wait because the trigger measures elapsed time with
time.monotonic(), which is not affected by wall-clock jumps (NTP corrections, DST, container clock skew, VM pause/resume). Eithertimeoutorend_timemust be provided.end_time (float | None) – Deprecated. Absolute wall-clock deadline (
time.time()based) after which the trigger reports a timeout. Kept for backward compatibility with triggers that were serialized by the previous version of the operator and are still in flight during an upgrade. Prefertimeoutfor new code.