ai-sdk-ollama 0.5.0 → 0.5.2
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/CHANGELOG.md +12 -0
- package/README.md +4 -2
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -208,12 +208,14 @@ Ollama supports tool calling with compatible models.
|
|
|
208
208
|
|
|
209
209
|
```typescript
|
|
210
210
|
import { z } from 'zod';
|
|
211
|
+
import { generateText, tool } from 'ai';
|
|
212
|
+
import { ollama } from 'ai-sdk-ollama';
|
|
211
213
|
|
|
212
214
|
const { text, toolCalls } = await generateText({
|
|
213
215
|
model: ollama('llama3.2'),
|
|
214
216
|
prompt: 'What is the weather in San Francisco?',
|
|
215
217
|
tools: {
|
|
216
|
-
getWeather: {
|
|
218
|
+
getWeather: tool({
|
|
217
219
|
description: 'Get current weather for a location',
|
|
218
220
|
inputSchema: z.object({
|
|
219
221
|
location: z.string().describe('City name'),
|
|
@@ -223,7 +225,7 @@ const { text, toolCalls } = await generateText({
|
|
|
223
225
|
// Your actual weather API call here
|
|
224
226
|
return { temp: 18, unit, condition: 'sunny' };
|
|
225
227
|
},
|
|
226
|
-
},
|
|
228
|
+
}),
|
|
227
229
|
},
|
|
228
230
|
});
|
|
229
231
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-sdk-ollama",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vercel AI SDK Provider for Ollama using official ollama-js library",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
],
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@ai-sdk/provider": "^2.0.0",
|
|
68
|
-
"@ai-sdk/provider-utils": "^3.0.
|
|
69
|
-
"ai": "^5.0.
|
|
68
|
+
"@ai-sdk/provider-utils": "^3.0.5",
|
|
69
|
+
"ai": "^5.0.23",
|
|
70
70
|
"ollama": "^0.5.17"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
@@ -75,19 +75,19 @@
|
|
|
75
75
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
76
76
|
"@total-typescript/tsconfig": "^1.0.4",
|
|
77
77
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
78
|
-
"@types/node": "^24.
|
|
79
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
80
|
-
"@typescript-eslint/parser": "^8.
|
|
78
|
+
"@types/node": "^24.3.0",
|
|
79
|
+
"@typescript-eslint/eslint-plugin": "^8.41.0",
|
|
80
|
+
"@typescript-eslint/parser": "^8.41.0",
|
|
81
81
|
"eslint-config-prettier": "^10.1.8",
|
|
82
82
|
"eslint-plugin-unicorn": "^60.0.0",
|
|
83
83
|
"prettier": "^3.6.2",
|
|
84
84
|
"rimraf": "^6.0.1",
|
|
85
85
|
"tsup": "^8.5.0",
|
|
86
86
|
"typescript": "^5.9.2",
|
|
87
|
-
"typescript-eslint": "^8.
|
|
87
|
+
"typescript-eslint": "^8.41.0",
|
|
88
88
|
"vite-tsconfig-paths": "^5.1.4",
|
|
89
89
|
"vitest": "^3.2.4",
|
|
90
|
-
"zod": "^4.
|
|
90
|
+
"zod": "^4.1.1"
|
|
91
91
|
},
|
|
92
92
|
"engines": {
|
|
93
93
|
"node": ">=22"
|