@easbot/ollama-sdk 0.3.26 → 0.3.28

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.
Files changed (3) hide show
  1. package/README.en.md +11 -14
  2. package/README.md +11 -14
  3. package/package.json +3 -3
package/README.en.md CHANGED
@@ -4,6 +4,9 @@
4
4
 
5
5
  AI SDK v3 compatible Ollama Provider with automatic complete event stream generation.
6
6
 
7
+ ## Version
8
+
9
+ v0.3.28
7
10
  ## Features
8
11
 
9
12
  - ✅ Full AI SDK v3 compatibility
@@ -312,7 +315,7 @@ All JSON Schema types are supported:
312
315
  const tools = {
313
316
  risky_operation: {
314
317
  description: 'Operation that may fail',
315
- inputSchema: { /* ... */ },
318
+ inputSchema: {/* ... */},
316
319
  execute: async (args) => {
317
320
  try {
318
321
  // Execute operation
@@ -378,17 +381,13 @@ const model = new NativeOllamaLanguageModel('qwen3:0.6b', {
378
381
 
379
382
  // Streaming generation
380
383
  const streamResult = await model.doStream({
381
- prompt: [
382
- { role: 'user', content: [{ type: 'text', text: 'Hello' }] }
383
- ],
384
+ prompt: [{ role: 'user', content: [{ type: 'text', text: 'Hello' }] }],
384
385
  tools: [/* ... */],
385
386
  });
386
387
 
387
388
  // Non-streaming generation
388
389
  const generateResult = await model.doGenerate({
389
- prompt: [
390
- { role: 'user', content: [{ type: 'text', text: 'Hello' }] }
391
- ],
390
+ prompt: [{ role: 'user', content: [{ type: 'text', text: 'Hello' }] }],
392
391
  tools: [/* ... */],
393
392
  });
394
393
  ```
@@ -429,22 +428,22 @@ response-metadata → text-start → text-delta (multiple) → text-end → fini
429
428
  **Tool Calling:**
430
429
 
431
430
  ```
432
- response-metadata → tool-input-start → tool-input-delta (multiple) →
431
+ response-metadata → tool-input-start → tool-input-delta (multiple) →
433
432
  tool-input-end → tool-call → finish (finishReason: 'tool-calls')
434
433
  ```
435
434
 
436
435
  **Reasoning + Text:**
437
436
 
438
437
  ```
439
- response-metadata → reasoning-start → reasoning-delta (multiple) →
438
+ response-metadata → reasoning-start → reasoning-delta (multiple) →
440
439
  reasoning-end → text-start → text-delta (multiple) → text-end → finish
441
440
  ```
442
441
 
443
442
  **Tool Calling + Reasoning:**
444
443
 
445
444
  ```
446
- response-metadata → reasoning-start → reasoning-delta (multiple) →
447
- reasoning-end → tool-input-start → tool-input-delta (multiple) →
445
+ response-metadata → reasoning-start → reasoning-delta (multiple) →
446
+ reasoning-end → tool-input-start → tool-input-delta (multiple) →
448
447
  tool-input-end → tool-call → finish
449
448
  ```
450
449
 
@@ -453,9 +452,7 @@ tool-input-end → tool-call → finish
453
452
  The SDK provides complete error types:
454
453
 
455
454
  ```typescript
456
- import {
457
- InvalidToolDefinitionError,
458
- } from '@easbot/ollama-sdk';
455
+ import { InvalidToolDefinitionError } from '@easbot/ollama-sdk';
459
456
 
460
457
  try {
461
458
  const model = new NativeOllamaLanguageModel('qwen3:0.6b');
package/README.md CHANGED
@@ -4,6 +4,9 @@
4
4
 
5
5
  AI SDK v3 兼容的 Ollama Provider,自动生成完整的事件流。
6
6
 
7
+ ## 版本
8
+
9
+ v0.3.28
7
10
  ## 特性
8
11
 
9
12
  - ✅ 完整的 AI SDK v3 兼容性
@@ -312,7 +315,7 @@ await Log.init({
312
315
  const tools = {
313
316
  risky_operation: {
314
317
  description: '可能失败的操作',
315
- inputSchema: { /* ... */ },
318
+ inputSchema: {/* ... */},
316
319
  execute: async (args) => {
317
320
  try {
318
321
  // 执行操作
@@ -378,17 +381,13 @@ const model = new NativeOllamaLanguageModel('qwen3:0.6b', {
378
381
 
379
382
  // 流式生成
380
383
  const streamResult = await model.doStream({
381
- prompt: [
382
- { role: 'user', content: [{ type: 'text', text: 'Hello' }] }
383
- ],
384
+ prompt: [{ role: 'user', content: [{ type: 'text', text: 'Hello' }] }],
384
385
  tools: [/* ... */],
385
386
  });
386
387
 
387
388
  // 非流式生成
388
389
  const generateResult = await model.doGenerate({
389
- prompt: [
390
- { role: 'user', content: [{ type: 'text', text: 'Hello' }] }
391
- ],
390
+ prompt: [{ role: 'user', content: [{ type: 'text', text: 'Hello' }] }],
392
391
  tools: [/* ... */],
393
392
  });
394
393
  ```
@@ -429,22 +428,22 @@ response-metadata → text-start → text-delta (多次) → text-end → finish
429
428
  **工具调用:**
430
429
 
431
430
  ```
432
- response-metadata → tool-input-start → tool-input-delta (多次) →
431
+ response-metadata → tool-input-start → tool-input-delta (多次) →
433
432
  tool-input-end → tool-call → finish (finishReason: 'tool-calls')
434
433
  ```
435
434
 
436
435
  **推理 + 文本:**
437
436
 
438
437
  ```
439
- response-metadata → reasoning-start → reasoning-delta (多次) →
438
+ response-metadata → reasoning-start → reasoning-delta (多次) →
440
439
  reasoning-end → text-start → text-delta (多次) → text-end → finish
441
440
  ```
442
441
 
443
442
  **工具调用 + 推理:**
444
443
 
445
444
  ```
446
- response-metadata → reasoning-start → reasoning-delta (多次) →
447
- reasoning-end → tool-input-start → tool-input-delta (多次) →
445
+ response-metadata → reasoning-start → reasoning-delta (多次) →
446
+ reasoning-end → tool-input-start → tool-input-delta (多次) →
448
447
  tool-input-end → tool-call → finish
449
448
  ```
450
449
 
@@ -453,9 +452,7 @@ tool-input-end → tool-call → finish
453
452
  SDK 提供了完整的错误类型:
454
453
 
455
454
  ```typescript
456
- import {
457
- InvalidToolDefinitionError,
458
- } from '@easbot/ollama-sdk';
455
+ import { InvalidToolDefinitionError } from '@easbot/ollama-sdk';
459
456
 
460
457
  try {
461
458
  const model = new NativeOllamaLanguageModel('qwen3:0.6b');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easbot/ollama-sdk",
3
- "version": "0.3.26",
3
+ "version": "0.3.28",
4
4
  "description": "Ollama provider for Vercel AI SDK - Run local LLMs with Ollama in your AI applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -43,8 +43,8 @@
43
43
  "@ai-sdk/provider-utils": "^4.0.45",
44
44
  "ai": "^6.0.253",
45
45
  "zod": "^4.4.3",
46
- "@easbot/types": "0.3.26",
47
- "@easbot/utils": "0.3.26"
46
+ "@easbot/types": "0.3.28",
47
+ "@easbot/utils": "0.3.28"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/node": "^25.9.5",