You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm doing text to sql and this is the tool I defined:
I initialized an agent with qwen2.5 and ran a simple query agent = CodeAgent( tools=[db_query_tool], model=HfApiModel("Qwen/Qwen2.5-Coder-32B-Instruct"), ) agent.run("how many albums are in the Album table?")
The agent generated the correct code, but the execution of the code returned an error message:
I mean if we just take the code out and run it, it is supposed to execute without error and print out 347.
Because album_count is [(347,)], album_count[0] is (347,), and running album_count[0] should not give any error.
So why is the code not able to be executed by the agent?
The text was updated successfully, but these errors were encountered:
xiaohanwu001
changed the title
LLM struggling to deal with text-to-sql outputs
LLM generated correct code but execution returned unexpected error message
Jan 23, 2025
I'm doing text to sql and this is the tool I defined:
I initialized an agent with qwen2.5 and ran a simple query
agent = CodeAgent( tools=[db_query_tool], model=HfApiModel("Qwen/Qwen2.5-Coder-32B-Instruct"), ) agent.run("how many albums are in the Album table?")
The agent generated the correct code, but the execution of the code returned an error message:
I mean if we just take the code out and run it, it is supposed to execute without error and print out 347.
Because
album_count
is[(347,)]
,album_count[0]
is(347,)
, and runningalbum_count[0]
should not give any error.So why is the code not able to be executed by the agent?
The text was updated successfully, but these errors were encountered: