autocommit.mistral_model

Functions

fix_formatting(content)

Fix formatting issues in the result.

get_initial_prompt([include_diff, rag, ...])

Get the initial prompt for the model

get_prompt(prompt_file)

Load a prompt from a resource file

main(api_key, repo_path[, max_tool_uses, ...])

Generate a commit message

says_ready(content)

Check if the model says it is ready (for use with tool calling)

autocommit.mistral_model.get_prompt(prompt_file)[source]

Load a prompt from a resource file

autocommit.mistral_model.says_ready(content)[source]

Check if the model says it is ready (for use with tool calling)

autocommit.mistral_model.get_initial_prompt(include_diff=False, rag=False, *, repository: Repository, repo_path, n_context_chunks=10, api_key, rate_limit)[source]

Get the initial prompt for the model

autocommit.mistral_model.fix_formatting(content)[source]

Fix formatting issues in the result.

Despite my best effort in prompt engineering, the model keeps messing up the format of the commit message.

autocommit.mistral_model.main(api_key, repo_path, max_tool_uses=10, use_tools=False, use_rag=True, separate_title_body=False)[source]

Generate a commit message