A library to simplify the usage of AI models.
✨ Supported services:
- Gemini
- OpenAI
- Claude
- Ollama
- HuggingFace
- Grok
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.
intelligent offers multiple configuration options to customize your model.
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
!
The model parameter has an already set default value.
Service | Default value | Module name |
---|---|---|
Gemini | gemini-1.5-flash |
GeminiService |
OpenAI | gpt-4o-mini |
OpenAIService |
Claude | claude-3-5-sonnet-20241022 |
ClaudeService |
Ollama | llava |
OllamaService |
HuggingFace | gpt2 |
HuggingFaceService |
Grok | grok-2-1212 |
GrokService |
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
!
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.