@node-llm/core 1.5.4 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -41
- package/dist/aliases.js +239 -239
- package/dist/chat/Chat.d.ts +17 -17
- package/dist/chat/Chat.d.ts.map +1 -1
- package/dist/chat/Chat.js +56 -42
- package/dist/chat/ChatOptions.d.ts +8 -9
- package/dist/chat/ChatOptions.d.ts.map +1 -1
- package/dist/chat/ChatResponse.d.ts +1 -1
- package/dist/chat/ChatResponse.d.ts.map +1 -1
- package/dist/chat/ChatResponse.js +22 -8
- package/dist/chat/ChatStream.d.ts.map +1 -1
- package/dist/chat/ChatStream.js +14 -21
- package/dist/chat/Content.d.ts +3 -3
- package/dist/chat/Content.d.ts.map +1 -1
- package/dist/chat/Content.js +3 -6
- package/dist/chat/Message.d.ts +3 -1
- package/dist/chat/Message.d.ts.map +1 -1
- package/dist/chat/Role.d.ts.map +1 -1
- package/dist/chat/Tool.d.ts +15 -15
- package/dist/chat/Tool.d.ts.map +1 -1
- package/dist/chat/Tool.js +9 -7
- package/dist/chat/ToolHandler.d.ts +4 -3
- package/dist/chat/ToolHandler.d.ts.map +1 -1
- package/dist/chat/ToolHandler.js +10 -15
- package/dist/chat/Validation.d.ts.map +1 -1
- package/dist/chat/Validation.js +9 -3
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +80 -25
- package/dist/constants.js +1 -1
- package/dist/errors/index.d.ts +21 -7
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +14 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/llm.d.ts +44 -46
- package/dist/llm.d.ts.map +1 -1
- package/dist/llm.js +201 -130
- package/dist/model_aliases.d.ts.map +1 -1
- package/dist/models/ModelRegistry.d.ts.map +1 -1
- package/dist/models/ModelRegistry.js +12 -10
- package/dist/models/PricingRegistry.d.ts +31 -0
- package/dist/models/PricingRegistry.d.ts.map +1 -0
- package/dist/models/PricingRegistry.js +101 -0
- package/dist/models/models.d.ts.map +1 -1
- package/dist/models/models.js +5954 -7352
- package/dist/models/types.d.ts +37 -34
- package/dist/models/types.d.ts.map +1 -1
- package/dist/moderation/Moderation.d.ts.map +1 -1
- package/dist/moderation/Moderation.js +15 -5
- package/dist/providers/BaseProvider.d.ts +12 -8
- package/dist/providers/BaseProvider.d.ts.map +1 -1
- package/dist/providers/BaseProvider.js +17 -7
- package/dist/providers/Provider.d.ts +20 -5
- package/dist/providers/Provider.d.ts.map +1 -1
- package/dist/providers/anthropic/AnthropicProvider.d.ts +1 -1
- package/dist/providers/anthropic/AnthropicProvider.d.ts.map +1 -1
- package/dist/providers/anthropic/AnthropicProvider.js +3 -3
- package/dist/providers/anthropic/Capabilities.d.ts +2 -1
- package/dist/providers/anthropic/Capabilities.d.ts.map +1 -1
- package/dist/providers/anthropic/Capabilities.js +3 -20
- package/dist/providers/anthropic/Chat.d.ts.map +1 -1
- package/dist/providers/anthropic/Chat.js +27 -17
- package/dist/providers/anthropic/Errors.d.ts.map +1 -1
- package/dist/providers/anthropic/Errors.js +5 -2
- package/dist/providers/anthropic/Models.d.ts.map +1 -1
- package/dist/providers/anthropic/Models.js +6 -6
- package/dist/providers/anthropic/Streaming.d.ts.map +1 -1
- package/dist/providers/anthropic/Streaming.js +17 -12
- package/dist/providers/anthropic/Utils.js +8 -5
- package/dist/providers/anthropic/index.d.ts.map +1 -1
- package/dist/providers/anthropic/index.js +4 -3
- package/dist/providers/anthropic/types.d.ts +11 -4
- package/dist/providers/anthropic/types.d.ts.map +1 -1
- package/dist/providers/deepseek/Capabilities.d.ts +7 -5
- package/dist/providers/deepseek/Capabilities.d.ts.map +1 -1
- package/dist/providers/deepseek/Capabilities.js +9 -5
- package/dist/providers/deepseek/Chat.d.ts.map +1 -1
- package/dist/providers/deepseek/Chat.js +10 -9
- package/dist/providers/deepseek/DeepSeekProvider.d.ts +1 -1
- package/dist/providers/deepseek/DeepSeekProvider.d.ts.map +1 -1
- package/dist/providers/deepseek/DeepSeekProvider.js +4 -4
- package/dist/providers/deepseek/Models.d.ts.map +1 -1
- package/dist/providers/deepseek/Models.js +7 -7
- package/dist/providers/deepseek/Streaming.d.ts.map +1 -1
- package/dist/providers/deepseek/Streaming.js +11 -8
- package/dist/providers/deepseek/index.d.ts.map +1 -1
- package/dist/providers/deepseek/index.js +5 -4
- package/dist/providers/gemini/Capabilities.d.ts +5 -33
- package/dist/providers/gemini/Capabilities.d.ts.map +1 -1
- package/dist/providers/gemini/Capabilities.js +7 -30
- package/dist/providers/gemini/Chat.d.ts.map +1 -1
- package/dist/providers/gemini/Chat.js +24 -19
- package/dist/providers/gemini/ChatUtils.d.ts.map +1 -1
- package/dist/providers/gemini/ChatUtils.js +10 -10
- package/dist/providers/gemini/Embeddings.d.ts.map +1 -1
- package/dist/providers/gemini/Embeddings.js +2 -2
- package/dist/providers/gemini/Errors.d.ts.map +1 -1
- package/dist/providers/gemini/Errors.js +5 -2
- package/dist/providers/gemini/GeminiProvider.d.ts +1 -1
- package/dist/providers/gemini/GeminiProvider.d.ts.map +1 -1
- package/dist/providers/gemini/GeminiProvider.js +3 -3
- package/dist/providers/gemini/Image.d.ts.map +1 -1
- package/dist/providers/gemini/Image.js +7 -7
- package/dist/providers/gemini/Models.d.ts.map +1 -1
- package/dist/providers/gemini/Models.js +6 -6
- package/dist/providers/gemini/Streaming.d.ts.map +1 -1
- package/dist/providers/gemini/Streaming.js +18 -14
- package/dist/providers/gemini/Transcription.d.ts.map +1 -1
- package/dist/providers/gemini/Transcription.js +11 -11
- package/dist/providers/gemini/index.d.ts +1 -1
- package/dist/providers/gemini/index.d.ts.map +1 -1
- package/dist/providers/gemini/index.js +5 -4
- package/dist/providers/gemini/types.d.ts +4 -4
- package/dist/providers/gemini/types.d.ts.map +1 -1
- package/dist/providers/ollama/Capabilities.d.ts.map +1 -1
- package/dist/providers/ollama/Capabilities.js +6 -2
- package/dist/providers/ollama/Models.js +1 -1
- package/dist/providers/ollama/OllamaProvider.d.ts +1 -1
- package/dist/providers/ollama/OllamaProvider.d.ts.map +1 -1
- package/dist/providers/ollama/OllamaProvider.js +2 -2
- package/dist/providers/ollama/index.d.ts +1 -1
- package/dist/providers/ollama/index.d.ts.map +1 -1
- package/dist/providers/ollama/index.js +7 -3
- package/dist/providers/openai/Capabilities.d.ts +2 -1
- package/dist/providers/openai/Capabilities.d.ts.map +1 -1
- package/dist/providers/openai/Capabilities.js +9 -21
- package/dist/providers/openai/Chat.d.ts.map +1 -1
- package/dist/providers/openai/Chat.js +18 -15
- package/dist/providers/openai/Embedding.d.ts.map +1 -1
- package/dist/providers/openai/Embedding.js +11 -7
- package/dist/providers/openai/Errors.d.ts.map +1 -1
- package/dist/providers/openai/Errors.js +5 -2
- package/dist/providers/openai/Image.d.ts.map +1 -1
- package/dist/providers/openai/Image.js +6 -6
- package/dist/providers/openai/Models.d.ts +1 -1
- package/dist/providers/openai/Models.d.ts.map +1 -1
- package/dist/providers/openai/Models.js +12 -8
- package/dist/providers/openai/Moderation.d.ts.map +1 -1
- package/dist/providers/openai/Moderation.js +6 -6
- package/dist/providers/openai/OpenAIProvider.d.ts +2 -3
- package/dist/providers/openai/OpenAIProvider.d.ts.map +1 -1
- package/dist/providers/openai/OpenAIProvider.js +4 -4
- package/dist/providers/openai/Streaming.d.ts.map +1 -1
- package/dist/providers/openai/Streaming.js +18 -13
- package/dist/providers/openai/Transcription.d.ts.map +1 -1
- package/dist/providers/openai/Transcription.js +15 -12
- package/dist/providers/openai/index.d.ts +1 -1
- package/dist/providers/openai/index.d.ts.map +1 -1
- package/dist/providers/openai/index.js +6 -5
- package/dist/providers/openai/types.d.ts +1 -1
- package/dist/providers/openai/utils.js +2 -2
- package/dist/providers/openrouter/Capabilities.d.ts +3 -3
- package/dist/providers/openrouter/Capabilities.d.ts.map +1 -1
- package/dist/providers/openrouter/Capabilities.js +21 -24
- package/dist/providers/openrouter/Models.d.ts.map +1 -1
- package/dist/providers/openrouter/Models.js +20 -16
- package/dist/providers/openrouter/OpenRouterProvider.d.ts.map +1 -1
- package/dist/providers/openrouter/OpenRouterProvider.js +1 -1
- package/dist/providers/openrouter/index.d.ts +1 -1
- package/dist/providers/openrouter/index.d.ts.map +1 -1
- package/dist/providers/openrouter/index.js +6 -5
- package/dist/providers/registry.d.ts +18 -2
- package/dist/providers/registry.d.ts.map +1 -1
- package/dist/providers/registry.js +17 -2
- package/dist/providers/utils.js +1 -1
- package/dist/schema/Schema.d.ts +3 -3
- package/dist/schema/Schema.d.ts.map +1 -1
- package/dist/schema/Schema.js +2 -2
- package/dist/schema/to-json-schema.d.ts +1 -1
- package/dist/schema/to-json-schema.d.ts.map +1 -1
- package/dist/streaming/Stream.d.ts.map +1 -1
- package/dist/streaming/Stream.js +3 -3
- package/dist/utils/Binary.d.ts.map +1 -1
- package/dist/utils/Binary.js +23 -13
- package/dist/utils/FileLoader.d.ts.map +1 -1
- package/dist/utils/FileLoader.js +25 -4
- package/dist/utils/audio.js +1 -1
- package/dist/utils/fetch.d.ts.map +1 -1
- package/dist/utils/fetch.js +3 -2
- package/dist/utils/logger.d.ts +3 -3
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,9 +44,10 @@ Integrating multiple LLM providers often means juggling different SDKs, API styl
|
|
|
44
44
|
NodeLLM represents a clear architectural boundary between your system and LLM vendors.
|
|
45
45
|
|
|
46
46
|
NodeLLM is **NOT**:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
|
|
48
|
+
- A wrapper around a single provider SDK (like `openai` or `@google/generative-ai`)
|
|
49
|
+
- A prompt-engineering framework
|
|
50
|
+
- An agent playground or experimental toy
|
|
50
51
|
|
|
51
52
|
---
|
|
52
53
|
|
|
@@ -57,6 +58,7 @@ Direct integrations often become tightly coupled to specific providers, making i
|
|
|
57
58
|
NodeLLM helps solve **architectural problems**, not just provide API access. It serves as the core integration layer for LLMs in the Node.js ecosystem.
|
|
58
59
|
|
|
59
60
|
### Strategic Goals
|
|
61
|
+
|
|
60
62
|
- **Provider Isolation**: Decouple your services from vendor SDKs.
|
|
61
63
|
- **Production-Ready**: Native support for streaming, automatic retries, and unified error handling.
|
|
62
64
|
- **Predictable API**: Consistent behavior for Tools, Vision, and Structured Outputs across all models, **now including full parity for streaming**.
|
|
@@ -68,16 +70,14 @@ NodeLLM helps solve **architectural problems**, not just provide API access. It
|
|
|
68
70
|
```ts
|
|
69
71
|
import { NodeLLM } from "@node-llm/core";
|
|
70
72
|
|
|
71
|
-
// 1.
|
|
72
|
-
NodeLLM.
|
|
73
|
+
// 1. Zero-Config (NodeLLM automatically reads NODELLM_PROVIDER and API keys)
|
|
74
|
+
const chat = NodeLLM.chat("gpt-4o");
|
|
73
75
|
|
|
74
76
|
// 2. Chat (High-level request/response)
|
|
75
|
-
const chat = NodeLLM.chat("gpt-4o");
|
|
76
77
|
const response = await chat.ask("Explain event-driven architecture");
|
|
77
78
|
console.log(response.content);
|
|
78
79
|
|
|
79
80
|
// 3. Streaming (Standard AsyncIterator)
|
|
80
|
-
// NOW with full support for Tools, Vision, and Schemas!
|
|
81
81
|
for await (const chunk of chat.stream("Explain event-driven architecture")) {
|
|
82
82
|
process.stdout.write(chunk.content);
|
|
83
83
|
}
|
|
@@ -85,15 +85,10 @@ for await (const chunk of chat.stream("Explain event-driven architecture")) {
|
|
|
85
85
|
|
|
86
86
|
### 🎯 Real-World Example: Brand Perception Checker
|
|
87
87
|
|
|
88
|
-
Built with NodeLLM - Multi-provider AI analysis, tool calling, and structured outputs working together
|
|
89
|
-
|
|
90
|
-
<p align="center">
|
|
91
|
-
<img src="assets/brand-perception-checker.png" alt="Brand Perception Checker" width="800" />
|
|
92
|
-
</p>
|
|
88
|
+
Built with NodeLLM - Multi-provider AI analysis, tool calling, and structured outputs working together.
|
|
93
89
|
|
|
94
90
|
**[View Example →](examples/brand-perception-checker/)**
|
|
95
91
|
|
|
96
|
-
|
|
97
92
|
---
|
|
98
93
|
|
|
99
94
|
## 🔧 Strategic Configuration
|
|
@@ -102,16 +97,16 @@ NodeLLM provides a flexible, **lazy-initialized** configuration system designed
|
|
|
102
97
|
|
|
103
98
|
```ts
|
|
104
99
|
// Recommended for multi-provider pipelines
|
|
105
|
-
|
|
100
|
+
const llm = createLLM({
|
|
106
101
|
openaiApiKey: process.env.OPENAI_API_KEY,
|
|
107
102
|
anthropicApiKey: process.env.ANTHROPIC_API_KEY,
|
|
108
|
-
ollamaApiBase: process.env.OLLAMA_API_BASE
|
|
103
|
+
ollamaApiBase: process.env.OLLAMA_API_BASE
|
|
109
104
|
});
|
|
110
105
|
|
|
111
106
|
// Support for Custom Endpoints (e.g., Azure or LocalAI)
|
|
112
|
-
|
|
107
|
+
const llm = createLLM({
|
|
113
108
|
openaiApiKey: process.env.AZURE_KEY,
|
|
114
|
-
openaiApiBase: "https://your-resource.openai.azure.com/openai/deployments/..."
|
|
109
|
+
openaiApiBase: "https://your-resource.openai.azure.com/openai/deployments/..."
|
|
115
110
|
});
|
|
116
111
|
```
|
|
117
112
|
|
|
@@ -124,21 +119,29 @@ NodeLLM.configure({
|
|
|
124
119
|
## 🔮 Capabilities
|
|
125
120
|
|
|
126
121
|
### 💬 Unified Chat
|
|
122
|
+
|
|
127
123
|
Stop rewriting code for every provider. `NodeLLM` normalizes inputs and outputs into a single, predictable mental model.
|
|
124
|
+
|
|
128
125
|
```ts
|
|
129
|
-
|
|
126
|
+
import { NodeLLM } from "@node-llm/core";
|
|
127
|
+
|
|
128
|
+
// Uses NODELLM_PROVIDER from environment (defaults to GPT-4o)
|
|
129
|
+
const chat = NodeLLM.chat();
|
|
130
130
|
await chat.ask("Hello world");
|
|
131
131
|
```
|
|
132
132
|
|
|
133
133
|
### 👁️ Smart Vision & Files
|
|
134
|
+
|
|
134
135
|
Pass images, PDFs, or audio files directly to **both `ask()` and `stream()`**. We handle the heavy lifting: fetching remote URLs, base64 encoding, and MIME type mapping.
|
|
136
|
+
|
|
135
137
|
```ts
|
|
136
|
-
await chat.ask("Analyze this interface", {
|
|
137
|
-
files: ["./screenshot.png", "https://example.com/spec.pdf"]
|
|
138
|
+
await chat.ask("Analyze this interface", {
|
|
139
|
+
files: ["./screenshot.png", "https://example.com/spec.pdf"]
|
|
138
140
|
});
|
|
139
141
|
```
|
|
140
142
|
|
|
141
143
|
### 🛠️ Auto-Executing Tools
|
|
144
|
+
|
|
142
145
|
Define tools once;`NodeLLM` manages the recursive execution loop for you, keeping your controller logic clean. **Works seamlessly with both regular chat and streaming!**
|
|
143
146
|
|
|
144
147
|
```ts
|
|
@@ -150,8 +153,8 @@ class WeatherTool extends Tool {
|
|
|
150
153
|
description = "Get current weather";
|
|
151
154
|
schema = z.object({ location: z.string() });
|
|
152
155
|
|
|
153
|
-
async execute({ location }) {
|
|
154
|
-
return `Sunny in ${location}`;
|
|
156
|
+
async execute({ location }) {
|
|
157
|
+
return `Sunny in ${location}`;
|
|
155
158
|
}
|
|
156
159
|
}
|
|
157
160
|
|
|
@@ -159,12 +162,15 @@ class WeatherTool extends Tool {
|
|
|
159
162
|
await chat.withTool(WeatherTool).ask("What's the weather in Tokyo?");
|
|
160
163
|
|
|
161
164
|
// Lifecycle Hooks for Error & Flow Control
|
|
162
|
-
chat.onToolCallError((call, err) => "STOP");
|
|
165
|
+
chat.onToolCallError((call, err) => "STOP");
|
|
163
166
|
```
|
|
167
|
+
|
|
164
168
|
**[Full Tool Calling Guide →](https://node-llm.eshaiju.com/core-features/tool-calling)**
|
|
165
169
|
|
|
166
170
|
### 🔍 Comprehensive Debug Logging
|
|
171
|
+
|
|
167
172
|
Enable detailed logging for all API requests and responses across every feature and provider:
|
|
173
|
+
|
|
168
174
|
```ts
|
|
169
175
|
// Set environment variable
|
|
170
176
|
process.env.NODELLM_DEBUG = "true";
|
|
@@ -175,10 +181,13 @@ process.env.NODELLM_DEBUG = "true";
|
|
|
175
181
|
// [NodeLLM] [OpenAI] Response: 200 OK
|
|
176
182
|
// { "id": "chatcmpl-123", ... }
|
|
177
183
|
```
|
|
184
|
+
|
|
178
185
|
**Covers:** Chat, Streaming, Images, Embeddings, Transcription, Moderation - across all providers!
|
|
179
186
|
|
|
180
187
|
### ✨ Structured Output
|
|
188
|
+
|
|
181
189
|
Get type-safe, validated JSON back using **Zod** schemas.
|
|
190
|
+
|
|
182
191
|
```ts
|
|
183
192
|
import { z } from "@node-llm/core";
|
|
184
193
|
const Product = z.object({ name: z.string(), price: z.number() });
|
|
@@ -188,27 +197,33 @@ console.log(res.parsed.name); // Full type-safety
|
|
|
188
197
|
```
|
|
189
198
|
|
|
190
199
|
### 🎨 Image Generation
|
|
200
|
+
|
|
191
201
|
```ts
|
|
192
202
|
await NodeLLM.paint("A cyberpunk city in rain");
|
|
193
203
|
```
|
|
194
204
|
|
|
195
205
|
### 🎤 Audio Transcription
|
|
206
|
+
|
|
196
207
|
```ts
|
|
197
208
|
await NodeLLM.transcribe("meeting-recording.wav");
|
|
198
209
|
```
|
|
199
210
|
|
|
200
211
|
### ⚡ Scoped Parallelism
|
|
212
|
+
|
|
201
213
|
Run multiple providers in parallel safely without global configuration side effects using isolated contexts.
|
|
214
|
+
|
|
202
215
|
```ts
|
|
203
216
|
const [gpt, claude] = await Promise.all([
|
|
204
217
|
// Each call branch off into its own isolated context
|
|
205
218
|
NodeLLM.withProvider("openai").chat("gpt-4o").ask(prompt),
|
|
206
|
-
NodeLLM.withProvider("anthropic").chat("claude-3-5-sonnet").ask(prompt)
|
|
219
|
+
NodeLLM.withProvider("anthropic").chat("claude-3-5-sonnet").ask(prompt)
|
|
207
220
|
]);
|
|
208
221
|
```
|
|
209
222
|
|
|
210
223
|
### 🧠 Deep Reasoning
|
|
224
|
+
|
|
211
225
|
Direct access to the thought process of models like **DeepSeek R1** or **OpenAI o1/o3** using the `.reasoning` field.
|
|
226
|
+
|
|
212
227
|
```ts
|
|
213
228
|
const res = await NodeLLM.chat("deepseek-reasoner").ask("Solve this logical puzzle");
|
|
214
229
|
console.log(res.reasoning); // Chain-of-thought
|
|
@@ -218,27 +233,27 @@ console.log(res.reasoning); // Chain-of-thought
|
|
|
218
233
|
|
|
219
234
|
## 🚀 Why use this over official SDKs?
|
|
220
235
|
|
|
221
|
-
| Feature
|
|
222
|
-
|
|
|
223
|
-
| **Provider Logic**
|
|
224
|
-
| **Streaming**
|
|
225
|
-
| **Streaming + Tools** | Automated Execution
|
|
226
|
-
| **Tool Loops**
|
|
227
|
-
| **Files/Vision**
|
|
228
|
-
| **Configuration**
|
|
236
|
+
| Feature | NodeLLM | Official SDKs | Architectural Impact |
|
|
237
|
+
| :-------------------- | :---------------------------- | :-------------------------- | :------------------------ |
|
|
238
|
+
| **Provider Logic** | Transparently Handled | Exposed to your code | **Low Coupling** |
|
|
239
|
+
| **Streaming** | Standard `AsyncIterator` | Vendor-specific Events | **Predictable Data Flow** |
|
|
240
|
+
| **Streaming + Tools** | Automated Execution | Manual implementation | **Seamless UX** |
|
|
241
|
+
| **Tool Loops** | Automated Recursion | Manual implementation | **Reduced Boilerplate** |
|
|
242
|
+
| **Files/Vision** | Intelligent Path/URL handling | Base64/Buffer management | **Cleaner Service Layer** |
|
|
243
|
+
| **Configuration** | Centralized & Global | Per-instance initialization | **Easier Lifecycle Mgmt** |
|
|
229
244
|
|
|
230
245
|
---
|
|
231
246
|
|
|
232
247
|
## 📋 Supported Providers
|
|
233
248
|
|
|
234
|
-
| Provider
|
|
235
|
-
|
|
|
236
|
-
| <img src="https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/openai.svg" height="18"> **OpenAI**
|
|
237
|
-
| <img src="https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/gemini-color.svg" height="18"> **Gemini**
|
|
238
|
-
| <img src="https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/anthropic-text.svg" height="12"> **Anthropic** | Chat, **Streaming + Tools**, Vision, PDF, Structured Output
|
|
239
|
-
| <img src="https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/deepseek-color.svg" height="18"> **DeepSeek**
|
|
240
|
-
| <img src="https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/openrouter.svg" height="18"> **OpenRouter**
|
|
241
|
-
| <img src="https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/ollama.svg" height="18"> **Ollama**
|
|
249
|
+
| Provider | Supported Features |
|
|
250
|
+
| :----------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------- |
|
|
251
|
+
| <img src="https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/openai.svg" height="18"> **OpenAI** | Chat, **Streaming + Tools**, Vision, Audio, Images, Transcription, **Reasoning** |
|
|
252
|
+
| <img src="https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/gemini-color.svg" height="18"> **Gemini** | Chat, **Streaming + Tools**, Vision, Audio, Video, Embeddings |
|
|
253
|
+
| <img src="https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/anthropic-text.svg" height="12"> **Anthropic** | Chat, **Streaming + Tools**, Vision, PDF, Structured Output |
|
|
254
|
+
| <img src="https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/deepseek-color.svg" height="18"> **DeepSeek** | Chat (V3), **Reasoning (R1)**, **Streaming + Tools** |
|
|
255
|
+
| <img src="https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/openrouter.svg" height="18"> **OpenRouter** | **Aggregator**, Chat, Streaming, Tools, Vision, Embeddings, **Reasoning** |
|
|
256
|
+
| <img src="https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/ollama.svg" height="18"> **Ollama** | **Local Inference**, Chat, Streaming, Tools, Vision, Embeddings |
|
|
242
257
|
|
|
243
258
|
---
|
|
244
259
|
|
|
@@ -251,7 +266,9 @@ npm install @node-llm/core
|
|
|
251
266
|
**[View Full Documentation ↗](https://node-llm.eshaiju.com/)**
|
|
252
267
|
|
|
253
268
|
### 🍿 Try the Live Demo
|
|
269
|
+
|
|
254
270
|
Want to see it in action? Run this in your terminal:
|
|
271
|
+
|
|
255
272
|
```bash
|
|
256
273
|
git clone https://github.com/node-llm/node-llm.git
|
|
257
274
|
cd node-llm
|
|
@@ -259,7 +276,6 @@ npm install
|
|
|
259
276
|
npm run demo
|
|
260
277
|
```
|
|
261
278
|
|
|
262
|
-
|
|
263
279
|
---
|
|
264
280
|
|
|
265
281
|
## 🤝 Contributing
|