airflow.providers.common.ai.example_dags.example_llamaindex_hook¶
Example DAGs demonstrating LlamaIndexHook + LlamaIndex operator usage.
Each DAG covers a single pattern. The docs reference these via
.. exampleinclude:: so the runnable snippets stay in sync.
Functions¶
Chunk + embed a directory of documents and persist the index locally. |
|
Load a persisted index and run similarity search. |
|
Persist the index directly to S3 -- no separate upload step. |
|
Use a non-OpenAI embedding by instantiating the LlamaIndex class directly. |
Module Contents¶
- airflow.providers.common.ai.example_dags.example_llamaindex_hook.example_llamaindex_embed()[source]¶
Chunk + embed a directory of documents and persist the index locally.
- airflow.providers.common.ai.example_dags.example_llamaindex_hook.example_llamaindex_retrieve()[source]¶
Load a persisted index and run similarity search.
- airflow.providers.common.ai.example_dags.example_llamaindex_hook.example_llamaindex_cloud_persist()[source]¶
Persist the index directly to S3 – no separate upload step.
- airflow.providers.common.ai.example_dags.example_llamaindex_hook.example_llamaindex_byo_embed_model()[source]¶
Use a non-OpenAI embedding by instantiating the LlamaIndex class directly.
LlamaIndex doesn’t ship a universal init helper, so the operator accepts a pre-built
BaseEmbeddinginstance and bypasses the hook entirely. Install the matching extra:pip install llama-index-embeddings-cohere.