Closed
Description
Replace manual Ollama integration with official npm package
Description
Currently, our project uses a custom, manually-implemented Ollama LLM provider integration. The Ollama team maintains an official TypeScript/JavaScript library (ollama npm package) that provides a more robust, well-tested, and maintained integration with Ollama's API.
Benefits
- Maintained by Ollama team: The official library will be kept up-to-date with API changes
- Type safety: The package includes TypeScript types
- Reduced maintenance burden: We don't need to maintain our own implementation
- Enhanced functionality: The official library likely includes more features and better error handling
- Better tested: The library is used by many projects and likely has better test coverage
Implementation Plan
- Add the
ollama
package as a dependency - Create a new implementation of our LLM provider that uses the official library
- Ensure compatibility with our existing provider interface
- Update any relevant documentation
- Add tests to verify the integration works correctly
Technical Details
- Current implementation:
/packages/agent/src/core/llm/providers/ollama.ts
- NPM package to use:
ollama
(latest version) - We'll need to map between our message format and the format expected by the library
Acceptance Criteria
- The new implementation works with the same configuration options as the current one
- All functionality of the current implementation is preserved
- Tests pass with the new implementation
- Documentation is updated to reflect any changes
Metadata
Metadata
Assignees
Labels
No labels