the-cafe / git-ai-commit

let AI write your commit messages
https://pypi.org/project/git-ai-commit/
51 stars 0 forks source link

Add support for anthropic models #18

Closed ming1in closed 3 months ago

ming1in commented 3 months ago

Description

Enable supporting Anthropic llm models

Test Plan

Check out the wiki in anthropic.md to setup your anthropic account and obtain an APi key

Install the new dependencies

pip install -r requirements-dev.txt    

Manually add the following to /.git/.ai_commit_msg_config.json to tell the tool to use ollama models

{
  "config": {
        ....
        "model": "claude-3-sonnet-20240229",
        "anthropic_api_key": "",
  }
}

Ensure that the CLI works as expected

> git_ai_commit

Ensure that the git hook continues to work

git add .

git commit

Follow ups