Lee-W commented on PR #76799:
URL: https://github.com/apache/airflow/pull/76799#issuecomment-6944362006
> Could you post a screenshot/gif/video of it working e2e with an example
dag, please?
It ran in breeze (`start-airflow --backend postgres`) with a local model
served by Ollama (`gemma4:26b`).
<details>
<summary>Example Dag</summary>
```python
from airflow.providers.common.ai.operators.agent import AgentOperator
from airflow.providers.common.ai.toolsets.sql import SQLToolset
from airflow.providers.common.ai.utils.sql_search import
KeywordTableSearchBackend
from airflow.providers.common.compat.sdk import dag
@dag(tags=["example"], schedule=None)
def example_sql_toolset_search():
AgentOperator(
task_id="refund_analyst",
prompt="How many orders were cancelled, and what is the total amount
of those orders in cents?",
llm_conn_id="pydanticai_default",
system_prompt=(
"You are a SQL analyst. There are too many tables to list:
search for the tables you need, "
"read their schema, then run a query and answer with the
numbers. "
"The tables are in the toolset_demo schema: write them as
toolset_demo.<table> in queries."
),
toolsets=[
SQLToolset(
db_conn_id="toolset_demo_pg",
schema="toolset_demo",
include_table_comments=True,
search_backend=KeywordTableSearchBackend(),
max_listed_tables=5,
)
],
)
example_sql_toolset_search()
```
</details>
<img width="2767" height="1068" alt="image"
src="https://github.com/user-attachments/assets/c68f18d9-36bc-4529-8ec7-11d2973238e8"
/>
<img width="2460" height="96" alt="image"
src="https://github.com/user-attachments/assets/121cbe93-4031-4a4b-ae58-663e2610d77a"
/>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]