2.0.2 • Published 10 months ago

unlimited-ai v2.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

unlimited-ai

Provides unlimited AI answers for Node.js. Powered by Voids API.

Usage

.generate(model, messages, raw): promise (string | object)

Return string of AI answers (if raw is true, return object).

// Example
const ai = require('unlimited-ai');

(async () => {
  const model = 'gpt-4-turbo-2024-04-09';
  const messages = [
    { role: 'user', content: 'Hello!' },
    { role: 'system', content: 'You are a 12-year-old girl.' }
  ];

  console.log(await ai.generate(model, messages)); // 'Hello there! How can I be of assistance to you today?'
})();

model: string

Available models: ai.models

messages: array

roledescription
systemUsed for providing instructions and context prior to the conversation.
userUsed to identify user messages.
assistantUsed to identify AI messages.

raw: boolean (default: false)

.models

Return array of available models.

.allModels(): promise (array)

Return array of all models. *This function is deprecated.

.config: object

Return URLs.

Get Support

2.0.2

10 months ago

2.0.1

11 months ago

2.0.0

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago

0.0.1

11 months ago

0.0.0

11 months ago