plugai
Version:
PlugAI is a library that provides interfaces to various AI models like Gemini, DeepSeek, and OpenAI.
54 lines (35 loc) • 1.16 kB
Markdown
PlugAI is a library that provides interfaces to various AI models like Gemini, DeepSeek, and OpenAI.
```bash
npm install plugai
```
```typescript
import { Gemini } from './models/gemini';
import { DeepSeek } from './models/deepseek';
import { OpenAI } from './models/openai';
```
```typescript
const gemini = new Gemini('your-gemini-api-key');
const deepSeek = new DeepSeek('your-deepseek-api-key');
const openAI = new OpenAI('your-openai-api-key');
```
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.
```typescript
const geminiResponse = await gemini.request({ query: 'your-query' }, 'optional-custom-url');
```
```typescript
const deepSeekResponse = await deepSeek.request({ query: 'your-query' }, 'optional-custom-url');
```
```typescript
const openAIResponse = await openAI.request({ prompt: 'your-prompt' }, 'optional-custom-url');
```
This project is licensed under the ISC License.