#openai-plugin-node - ChatGPT plugins with API

3 messages · Page 1 of 1 (latest)

opaque raven
#

I have made a simple modification in openai-node to utilize chatgpt plugins with API. I hope you find it useful. Although there is still much work to be done, it is already partially functional.

Please feel free to contribute to further development of the module by submitting pull requests or reporting any issues you encounter. Your contributions and feedback are highly appreciated.

Note that not all plugins may be compatible with the module at this time due to the lack of support for authentication and multiple versions of OpenAPI, which need to be added. Thank you for your understanding.

https://github.com/guidevops/openai-plugin-node

Installation

npm install openai-plugin
import { Configuration, OpenAIPluginApi, Plugins } from "openai-plugin";
import dotenv from "dotenv";
dotenv.config();

const configuration = new Configuration({
  apiKey: process.env.OPENAI_API_KEY,
});
const openai = new OpenAIPluginApi(configuration);

(async () => {
    var plugins = new Plugins([
      {
        name: 'Calculator', 
        manifest: 'https://chat-calculator-plugin.supportmirage.repl.co/.well-known/ai-plugin.json'
      }
    ])

    var completion = await openai.createChatCompletionPlugin({
      model: "gpt-3.5-turbo",
      messages: [{role: "user", content: "How much is 3849 x 8394 ?"}],
      plugins 
    });
    
    console.log(completion.completions.map(completion => completion.message));
    
})();
GitHub

The OpenAI Node.js library modificated to work with plugins - GitHub - guidevops/openai-plugin-node: The OpenAI Node.js library modificated to work with plugins

#

openai-plugin-node -ChatGPT plugins with API

#

openai-plugin-node - ChatGPT plugins with API