Python Example "SQL_Agent" not working
Hey! First of all a huge fan of composio's work and I have just started to test out all the local tools and examples available on composio.
I cloned the repo, setup the Virtual env and then went through the required steps written in README.md for
sql-agent
python example. Did everything as stated, entered the API key. But I got the output as shown in the image attached.
I tried debugging it by placing print statements inside of the sqltool
python local-tool, and it seems that the execute()
method for SQLQuery
class (in file sql_query.py
) does not seem to be called itself.
Is it just me or is it a known issue? Would really appreciate your help π
21 Replies
can you try doing
composio apps update
Does that solve issue for you?fascinating-indigoOPβ’7mo ago
let me try, one moment please
fascinating-indigoOPβ’7mo ago
The same thing π

ok one more thing.
pip install composio-core -U
does this help?fascinating-indigoOPβ’7mo ago
one moment please
fascinating-indigoOPβ’7mo ago
same thing π

interesting. And what's the framework you are using?
ok crewai. So two things
pip install composio-crewai -U
composio apps update
your crewai version is older, I can see in screenshot.
so may be this should solve.fascinating-indigoOPβ’7mo ago
oh okay, I will do that, one moment
fascinating-indigoOPβ’7mo ago
I updated crewAI and ran
composio apps update
Now i get this error
This is openai error.
You can try different models if you don't have access to gpt-4o.
may be gpt-4-turbo?
fascinating-indigoOPβ’7mo ago
okay, let me try that
its the same error
tried it with gpt-4, gpt-4-turbo and gpt-4o
Were you able to use openai key independently?
fascinating-indigoOPβ’7mo ago
sorry, I dont follow, what do you mean by using openai key independently?
I generated the api key in openai and then put it in the .env file explicitly. Is that what you are asking?
yes exactly. https://platform.openai.com/playground/chat?models=gpt-4o
Can you click on this link and try a model here. If it works you have access to the model.
fascinating-indigoOPβ’7mo ago
I have these models available

ya but can you try it by asking a query. You will see a result.
fascinating-indigoOPβ’7mo ago
okay, one moment
I dont have access to query any of these models. Shall I try another llm?
yes. actually you can try gemini it's free.
fascinating-indigoOPβ’7mo ago
okay
Were you able to get it working with gemini?
ratty-blushβ’5mo ago
Hey @Harshmeet Singh, was it working fine to you π ??