Conversation
Contributor
OriHizkiaho
commented
May 5, 2025
- 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
- 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
There was a problem hiding this comment.
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. |
Owner
|
@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 🙏🏽 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.