eosphoros-ai / DB-GPT

AI Native Data App Development framework with AWEL(Agentic Workflow Expression Language) and Agents

Home Page:https://docs.dbgpt.site

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Doc][Module Name] Documentation bug or improvement

lastshogunshin opened this issue · comments

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

I follow the instruction in "Write your own data with AWEL" tutorial page.
image

But after I got the LLM generated SQL query result and try to execute it, some error occured:
image
Can anyone tell how to fix this problem and get the query result? Thanks ahead.

Documentation Links

https://docs.dbgpt.site/docs/latest/awel/cookbook/write_your_chat_database

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Add Info for Question:
The error happened in this line to map one task to another:
sql_parse_task >> MapOperator(lambda x: x["sql"]) >> db_query_task

Since sql_parse_task was created by SQLOutputParser(), db_query_task was created by DatasourceOperator(), as a result they will naturally have different Node ID, is that right?
So how can I correctly use Mapping method among different tasks, so that the task chain can be set smoothly and able to run through?

Was self-resolved. Just need to add the Mapping methodsql_parse_task >> MapOperator(lambda x: x["sql"]) >> db_query_task and df_query_task construction code to the same DAG function, the node ID will remain the same.