Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Roadmap] Full Support for OPENAPI Specs to Integrate More Tools #563

Open
6 of 14 tasks
yiyiyi0817 opened this issue May 19, 2024 · 0 comments
Open
6 of 14 tasks

[Roadmap] Full Support for OPENAPI Specs to Integrate More Tools #563

yiyiyi0817 opened this issue May 19, 2024 · 0 comments
Assignees
Labels
API Modifies the API enhancement New feature or request FunctionCall Roadmap

Comments

@yiyiyi0817
Copy link
Member

yiyiyi0817 commented May 19, 2024

Required prerequisites

Motivation

Using the openapi specs integration tools allows CAMEL developers to develop and integrate a large number of tools more quickly.

Solution

1. Support All Kinds of Sepcs Files or Urls

Reference: https://github.com/RonnyPfannschmidt/prance

2. Support All Kinds of Security Scheme

  • Support Security Scheme: apiKey
  • Support Security Scheme: http
  • Support Security Scheme: oauth2
  • Support Security Scheme: openIdConnect

Reference: https://swagger.io/specification/#security-scheme-object

I think we can start by integrating apiKey, which is a more common security authentication method. It may not be necessary to integrate all of the above methods, and sometimes just one of them will succeed in ping API.

3. Add more APIs

  • Collect more OPENAPI specs files or URLs of different APIs

Reference: xlang-ai/OpenAgents#132

According to the authors of OpenAgentshttps://github.com/xlang-ai/OpenAgents. while API Hubs like Rapid have integrated a large number of traditional APIs with openapi specs, their experiments revealed:

"Initially, we tried to import some tools from Rapid API to expand our collection, but we found (I'm not sure if any research is currently addressing this) that the input parameters and returned information from these traditional APIs are overly complex and structured data. The current models struggle with planning and accurately parsing natural language into such inputs, and understanding the responses is also limited, especially with noisy data. Not to mention the API providers are generally not willing to provide APIs to developers instead of companies. We cannot afford the efforts on wrapping on these APIs."

Therefore, their approach was

"So, we actually reverse-engineered the functionality of OpenAI Plugins, obtained the endpoints and openapi. yaml from the providers offering Plugins API to them, and then automated pings to see if they were free or if some required additional verification or had IP restrictions. Then, we retrieved the APIs that were accessible. At that time, we were able to retrieve over a hundred APIs using this method."

I think perhaps we could consider their approach, even though OpenAI's plugin functionality has now become the GPT Store.

Alternatives

No response

Additional context

This issue may not apply to APIs that do not have openapi specs, as well as APIs that return overly complex and structured data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Modifies the API enhancement New feature or request FunctionCall Roadmap
Projects
Status: 🚀 Roadmap
Development

No branches or pull requests

2 participants