Added apicaller tool to make calls using OpenAPI specification
I'm using a full-featured generated swagger client to make API requests. This seems more convenient and flexible than LangChain's approach, which extracts GET/POST requests from the specification.
As the author of this library https://github.com/Romamo/pyapicaller I plan to add new formats and automatically improve poorly documented APIs by adapting them to AI.
@Romamo i think some steps related to generating swagger/openapi client sdk are missing in the steps. could you please add?
Hello @Romamo!
I am having trouble testing the cookbook:
The swagger_clients directory was created and populated but the tool is not being executed.
The
swagger_clientsdirectory was created and populated but the tool is not being executed.
Thank you. When you run a script using an absolute path, such as: python cookbook/tools/apicaller_tools.py Python does not add the directory of the script to sys.path.
To resolve this, you can manually add the directory to sys.path, set it in the PATH environment variable, or provide it as an argument:
agent = Agent(tools=[ApiCaller(CLIENT_PACKAGE, OPENAPI_SPEC,
path='path to swagger_client directory')],
show_tool_calls=True)
However, the best practice is to run the example script as a module using Python's -m option:
python -m cookbook.tools.apicaller_tools
Hey @Romamo! I hope you're doing well. I wanted to share that we recently rebranded from Phidata to Agno, and we'd love to have this merged under the Agno name. I really appreciate your help with this. Sorry for the extra step to port this to Agno! Let me know if you have any questions, and I’d be more than happy to assist.
Closing this PR due to inactivity. Please feel free to reopen if you still want to work on it!