Skip to main content

The project integrates Git with a llm (OpenAI, LlamaCpp, and GPT-4-All) to extend the capabilities of git.

Project description

git-llm

The project integrates Git with a llm (OpenAI, LlamaCpp, and GPT-4-All) to extend the capabilities of git. It supports offline processing using GPT4All without sharing your code with third parties, or you can use OpenAI if privacy is not a concern for you. It is only recommended for educational purposes and not for production use.

Installation

To install git-llm, you need to have Python 3.9 and an OpenAI API key api-keys. Additionally, if you want to use the GPT4All model, you need to download the ggml-gpt4all-j-v1.3-groovy.bin model. If you prefer a different model, you can download it from GPT4All and configure path to it in the configuration and specify its path in the configuration. If you want some files to be ignored, add them to .gitignore.

To install git-llm, run the following command in your terminal:

pip install git-llm

Usage

To use git-llm, you need to configure it first. To do this, run the following command:

git-llm config

changelog - generates a list of changes from output git diff --staged

git-llm changelog

This command reviews the changes staged for commit using git diff --staged and writes a commit message following the Conventional format.

git-llm commit

You can also edit the configuration manually by editing the ~/.git_llm_config.yaml file. If for some reason you cannot find the configuration file, just run the tool and at the very beginning it will output the path to the configuration file.

# The OpenAI API key. You can get it from https://beta.openai.com/account/api-keys
api_key: sk-xxx
# maximum size of a chunk of text to be sent to the model
chunk_size: 500
# the maximum tokens
max_tokens: 1048
# model name for the OpenAI API
model_name: gpt-3.5-turbo
# model path for the local model
model_path: models/ggml-gpt4all-j-v1.3-groovy.bin
# model type: openai or local
model_type: openai

Features

More commands will be added in the future.

Contributing

Contributions are always welcome!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git_llm-0.1.3.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_llm-0.1.3-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file git_llm-0.1.3.tar.gz.

File metadata

  • Download URL: git_llm-0.1.3.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for git_llm-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6e8207eded70fe5be3cb1e99e8c5f2b4e4382114c69c5a375a30b00c7e9e37e3
MD5 8f583d1f1f0e3abbe1e2ac19cff7a78d
BLAKE2b-256 bedbf3c41bfc7b0c5204b0fb17afd7e671c531008ccf74fd535ad2a9aca22269

See more details on using hashes here.

File details

Details for the file git_llm-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: git_llm-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for git_llm-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c4af0ffdc138dd7d9ea9772a86429162d771d0091d262b37541ae540d1e7e9b0
MD5 e634a70ffd3b493bb1707903510e121f
BLAKE2b-256 e0483a7671192af7f911aa2f55b866767c248f561d5a1e21e80ce647997be328

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page