ai-sdk-ollama 0.6.1 → 0.7.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/CHANGELOG.md +67 -0
- package/README.md +7 -0
- package/dist/index.browser.cjs +1646 -12
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +328 -74
- package/dist/index.browser.d.ts +328 -74
- package/dist/index.browser.js +1646 -12
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +1651 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +328 -74
- package/dist/index.d.ts +328 -74
- package/dist/index.js +1646 -12
- package/dist/index.js.map +1 -1
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,72 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8f0a292: Comprehensive reliability improvements and new Ollama-specific functions
|
|
8
|
+
|
|
9
|
+
## New Features
|
|
10
|
+
|
|
11
|
+
### Ollama-Specific AI Functions
|
|
12
|
+
- **generateTextOllama**: Enhanced text generation with reliability features
|
|
13
|
+
- **generateObjectOllama**: Structured object generation with schema validation
|
|
14
|
+
- **streamTextOllama**: Real-time text streaming with tool calling support
|
|
15
|
+
- **streamObjectOllama**: Progressive object streaming with reliability features
|
|
16
|
+
|
|
17
|
+
### Reliability Features
|
|
18
|
+
- **Tool Calling Reliability**: Enhanced tool calling with retry logic and parameter normalization
|
|
19
|
+
- **Object Generation Reliability**: Schema validation, type mismatch fixing, and fallback generation
|
|
20
|
+
- **Streaming Reliability**: Better stop conditions and response synthesis
|
|
21
|
+
- **Error Recovery**: Automatic retry mechanisms and graceful error handling
|
|
22
|
+
|
|
23
|
+
## Examples and Documentation
|
|
24
|
+
|
|
25
|
+
### New Example Files
|
|
26
|
+
- **Comprehensive Demo**: `generate-all-ollama-demo.ts` - showcases all Ollama-specific functions
|
|
27
|
+
- **Streaming Demos**: `stream-text-ollama-demo.ts` and `stream-object-ollama-demo.ts`
|
|
28
|
+
- **Debug Tools**: `debug-streaming-issue.ts` and `debug-gpt-oss-tools.ts`
|
|
29
|
+
- **Testing Examples**: Various test files for different use cases
|
|
30
|
+
|
|
31
|
+
### Enhanced Examples
|
|
32
|
+
- **Browser Example**: Fixed to use `createOllama()` for proper provider configuration
|
|
33
|
+
- **Node Examples**: Updated with better error handling and TypeScript compliance
|
|
34
|
+
- **Tool Calling**: Comprehensive examples with weather and search tools
|
|
35
|
+
|
|
36
|
+
## Technical Improvements
|
|
37
|
+
|
|
38
|
+
### TypeScript Fixes
|
|
39
|
+
- Fixed variable naming conflicts in all example files
|
|
40
|
+
- Resolved async/await issues with tool calls
|
|
41
|
+
- Fixed Zod schema definitions for record types
|
|
42
|
+
- Improved type safety across all examples
|
|
43
|
+
|
|
44
|
+
### API Enhancements
|
|
45
|
+
- Better error messages and debugging information
|
|
46
|
+
- Enhanced configuration options for reliability features
|
|
47
|
+
- Improved streaming performance and reliability
|
|
48
|
+
- Better integration with Ollama's native capabilities
|
|
49
|
+
|
|
50
|
+
## Breaking Changes
|
|
51
|
+
|
|
52
|
+
None - all changes are backward compatible
|
|
53
|
+
|
|
54
|
+
## Migration Guide
|
|
55
|
+
|
|
56
|
+
Existing code continues to work unchanged. New Ollama-specific functions are available as additional options for enhanced reliability.
|
|
57
|
+
|
|
58
|
+
## 0.6.2
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- 0e2f392: Fix TypeScript compilation errors in examples
|
|
63
|
+
- Fixed variable naming conflicts in stream-vs-generate-test.ts, debug-streaming-issue.ts, generate-all-ollama-demo.ts, stream-object-ollama-demo.ts, and stream-text-ollama-demo.ts
|
|
64
|
+
- Fixed undefined variable 'ollamaRaw' in existing-client-example.ts
|
|
65
|
+
- Fixed browser example to use createOllama() instead of passing baseURL to ollama() function
|
|
66
|
+
- Fixed async tool calls access in streaming examples
|
|
67
|
+
- Fixed Zod schema definitions for record types
|
|
68
|
+
- All examples now compile and run successfully
|
|
69
|
+
|
|
3
70
|
## 0.6.1
|
|
4
71
|
|
|
5
72
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -7,6 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
A Vercel AI SDK v5+ provider for Ollama built on the official `ollama` package. Type safe, future proof, with cross provider compatibility and native Ollama features.
|
|
9
9
|
|
|
10
|
+
> **Two Ways to Use**: This library enhances the standard AI SDK functions with automatic reliability improvements when you pass tools or schemas. For maximum reliability, use these drop-in replacements written specifically for Ollama:
|
|
11
|
+
>
|
|
12
|
+
> - `generateText` → `generateTextOllama`
|
|
13
|
+
> - `generateObject` → `generateObjectOllama`
|
|
14
|
+
> - `streamText` → `streamTextOllama`
|
|
15
|
+
> - `streamObject` → `streamObjectOllama`
|
|
16
|
+
|
|
10
17
|
## Contents
|
|
11
18
|
|
|
12
19
|
- [AI SDK Ollama Provider](#ai-sdk-ollama-provider)
|