fascinating-indigo
fascinating-indigoβ€’7mo ago

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 😁
No description
21 Replies
Soham
Sohamβ€’7mo ago
can you try doing composio apps update Does that solve issue for you?
fascinating-indigo
fascinating-indigoOPβ€’7mo ago
let me try, one moment please
fascinating-indigo
fascinating-indigoOPβ€’7mo ago
The same thing πŸ˜…
No description
Soham
Sohamβ€’7mo ago
ok one more thing. pip install composio-core -U does this help?
fascinating-indigo
fascinating-indigoOPβ€’7mo ago
one moment please
fascinating-indigo
fascinating-indigoOPβ€’7mo ago
same thing πŸ˜…
No description
Soham
Sohamβ€’7mo ago
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-indigo
fascinating-indigoOPβ€’7mo ago
oh okay, I will do that, one moment
fascinating-indigo
fascinating-indigoOPβ€’7mo ago
I updated crewAI and ran composio apps update Now i get this error
No description
Soham
Sohamβ€’7mo ago
This is openai error. You can try different models if you don't have access to gpt-4o. may be gpt-4-turbo?
fascinating-indigo
fascinating-indigoOPβ€’7mo ago
okay, let me try that its the same error tried it with gpt-4, gpt-4-turbo and gpt-4o
Soham
Sohamβ€’7mo ago
Were you able to use openai key independently?
fascinating-indigo
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?
Soham
Sohamβ€’7mo ago
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-indigo
fascinating-indigoOPβ€’7mo ago
I have these models available
No description
Soham
Sohamβ€’7mo ago
ya but can you try it by asking a query. You will see a result.
fascinating-indigo
fascinating-indigoOPβ€’7mo ago
okay, one moment I dont have access to query any of these models. Shall I try another llm?
Soham
Sohamβ€’7mo ago
yes. actually you can try gemini it's free.
fascinating-indigo
fascinating-indigoOPβ€’7mo ago
okay
Soham
Sohamβ€’7mo ago
Were you able to get it working with gemini?
ratty-blush
ratty-blushβ€’5mo ago
Hey @Harshmeet Singh, was it working fine to you πŸ˜„ ??

Did you find this page helpful?