1.1.1 • Published 5 months ago

intelligent v1.1.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

intelligent

license latest

A library to simplify the usage of AI models.

Supported services:

  • Gemini
  • OpenAI
  • Claude
  • Ollama
  • HuggingFace
  • Grok

Introduction

intelligent is a simplistic and clean utility library to simplify the usage of AI services for Node.js applications and libraries, intelligent is useful for AI-related Node.js applications, AI-related JavaScript libraries, etc.

intelligent supports multiple artificial intelligence services and offers model configuration.

Configuration

intelligent offers multiple configuration options to customize your model.

apiKey (string)

intelligent does not provide API keys/secrets already, you need to have your own. You can set the API key/secret using the code below

const ai = new GeminiService("YOUR-API-KEY");

Use the imported service not just GeminiService!

model (string)

The model parameter has an already set default value.

ServiceDefault valueModule name
Geminigemini-1.5-flashGeminiService
OpenAIgpt-4o-miniOpenAIService
Claudeclaude-3-5-sonnet-20241022ClaudeService
OllamallavaOllamaService
HuggingFacegpt2HuggingFaceService
Grokgrok-2-1212GrokService

You can customize the model parameter using the code below

const ai = new GeminiService("YOUR-API-KEY", "PROVIDE-MODEL-HERE");

Use the imported service not just GeminiService!

Example

const { GeminiService } = require("intelligent");

const ai = new GeminiService("API-KEY");

ai.response("Why is the sky blue?").then((res) => {
  console.log(res);
});

Using default model value.

const { GeminiService } = require("intelligent");

const ai = new GeminiService("API-KEY", "gemini-1.5-pro");

ai.response("Why is the sky blue?").then((res) => {
  console.log(res);
});

Using gemini-1.5-pro as model value.

1.1.1

5 months ago

1.1.0

5 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago