Skip to content

Conversation

@OriHizkiaho
Copy link
Contributor

  • added support for ollama if not any of OpenAI, Anthropic and Google was provided
  • upgraded langchain packages
  • added a test for ollama and removed test for unsupported model

OriHizkiaho and others added 3 commits May 5, 2025 17:24
- Integrate Ollama models (e.g., llama2, llama3) using langchain-ollama
- Raise error for explicitly unsupported model types instead of defaulting
- Add langchain-ollama dependency to pyproject.toml
- Remove internal helper function docstrings

CoGenerated with CommitAi
@lguibr lguibr requested a review from Copilot May 5, 2025 20:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Ollama models to Commitai by integrating a new chat model, updating tests, and refreshing dependency versions and documentation.

  • Integrates ChatOllama for models starting with "llama" in the CLI.
  • Updates tests to mock and verify Ollama functionality.
  • Upgrades langchain package versions and revises the README and pyproject.toml accordingly.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/test_cli.py Added new test and mocks for Ollama support in the CLI.
pyproject.toml Bumped version and updated dependency ranges for langchain and added Ollama.
commitai/cli.py Integrated ChatOllama in the model initialization workflow.
README.md Updated documentation to include local AI models via Ollama.

@lguibr
Copy link
Owner

lguibr commented May 5, 2025

@OriHizkiaho Thank you so much for your contribution. I've made small adjustments to mypy and ensured the model name starts with llama. Hope to see more contributions from you and next time using commitai for the commits hahaha 🙏🏽

@lguibr lguibr merged commit 10ca9b8 into lguibr:main May 5, 2025
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants