plugai
v1.0.2
Published
PlugAI is a library that provides interfaces to various AI models like Gemini, DeepSeek, and OpenAI.
Readme
PlugAI
PlugAI is a library that provides interfaces to various AI models like Gemini, DeepSeek, and OpenAI.
Installation
npm install plugaiUsage
Importing the Models
import { Gemini } from './models/gemini';
import { DeepSeek } from './models/deepseek';
import { OpenAI } from './models/openai';Creating Instances
const gemini = new Gemini('your-gemini-api-key');
const deepSeek = new DeepSeek('your-deepseek-api-key');
const openAI = new OpenAI('your-openai-api-key');Making Requests
Each model has a request method that accepts input data and an optional URL parameter. If the URL is not provided, the default URL will be used.
Gemini
const geminiResponse = await gemini.request({ query: 'your-query' }, 'optional-custom-url');DeepSeek
const deepSeekResponse = await deepSeek.request({ query: 'your-query' }, 'optional-custom-url');OpenAI
const openAIResponse = await openAI.request({ prompt: 'your-prompt' }, 'optional-custom-url');License
This project is licensed under the ISC License.
