JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12873
  • Score
    100M100P100Q166510F
  • License ISC

Provides unlimited AI answers for Node.js.

Package Exports

  • unlimited-ai
  • unlimited-ai/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (unlimited-ai) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

unlimited-ai

Provides unlimited AI answers for Node.js.

Usage

ai.generate(model, messages, raw): promise

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

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

(async () => {
  const model = 'gpt-4';
  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

role description
system Used for providing instructions and context prior to the conversation.
user Used to identify user messages.
assistant Used to identify AI messages.

raw: boolean (default: false)

ai.models

Return array of available models.

ai.allModels(): promise

Return array of all models. *This function has been deprecated.

ai.config: object

Return URLs.