This connector for Prompt Mixer allows you to access the OpenAI API from within Prompt Mixer. It now includes a function that can execute any query in MongoDB.
- Connect to the OpenAI API and use various models to generate text, code, and more
- Pass prompts and settings to the OpenAI API with just a few clicks
- Output is displayed directly in Prompt Mixer
- Execute MongoDB queries through a callable function in the connector
To install:
- In Prompt Mixer, navigate to Connectors > All Connectors.
- Locate OpenAI with Function Calling and install it.
- After installation, go to Connectors > Installed > OpenAI with Function Calling to configure your API key and database connection string.
After installing and configuring your API key and database connection string, you can start using any OpenAI model through the assistant panel in Prompt Mixer.
During an API call, you can specify functions which the model will use to intelligently generate a JSON object. This object contains the necessary arguments for calling one or several functions. Note that the Chat Completions API will not execute these functions; it merely creates the JSON for you to use in your function calls within your own code.
For more details on how this works, consult the OpenAI documentation.
To test your functions, please fork this repository, then add and describe your functions.
To connect to your MongoDB database, add your connection string in the connector settings.
Pull requests and issues are welcome! Let me know if you have any problems using the connector or ideas for improvements.
For guidance on building your own connector, refer to this documentation.
MIT