edreisMD / plugnplai

🎸 Integrating AI plugins to LLMs
https://plugnplai.com
MIT License
230 stars 17 forks source link

Add call_api() function to call plugins #123

Closed sweep-ai[bot] closed 1 year ago

sweep-ai[bot] commented 1 year ago

This PR adds a call_api() function to the Plugins class to call an operation in an active plugin.

The function takes the following arguments:

It gets the PluginObject for the specified plugin, gets the operation details, and calls the operation. It returns the response from the API call.

This allows calling plugins directly from the Plugins class, in addition to using the apply_plugins decorator.

Fixes #122.