airflow.providers.common.ai.example_dags.example_llm¶
Example DAGs demonstrating LLMOperator and @task.llm usage.
Classes¶
Named entities extracted from a text. |
|
BaseNotifier class for sending notifications. |
Functions¶
Module Contents¶
- class airflow.providers.common.ai.example_dags.example_llm.Entities(/, **data)[source]¶
Bases:
pydantic.BaseModelNamed entities extracted from a text.
- airflow.providers.common.ai.example_dags.example_llm.example_llm_operator_templated_usage_limits()[source]¶
- class airflow.providers.common.ai.example_dags.example_llm.LogNotifier(message)[source]¶
Bases:
airflow.providers.common.compat.notifier.BaseNotifierBaseNotifier class for sending notifications.
It can be used asynchronously (preferred) if async_notify`is implemented and/or synchronously if `notify is implemented.
Currently, the Dag/Task state change callbacks run on the Dag Processor and only support sync usage.
- Usage::
# Asynchronous usage await Notifier(context)
# Synchronous usage notifier = Notifier() notifier(context)