Prompt OpenAI models with git repository context
Project description
Git-Vector
Git-Vector is a command-line tool that allows developers to interact with their Git repositories using OpenAI models. It provides a conversational interface to help you understand and navigate your codebase by leveraging the full context of your repository.
Table of Contents
Features
- Conversational Interface: Interactively ask questions about your codebase and receive detailed explanations.
- Full Repository Context: The tool indexes your entire Git repository to provide context-aware responses.
- Caching Mechanism: Embeddings are cached to improve performance on subsequent runs.
- Customizable Models: Supports different OpenAI models for both embeddings and chat completions.
- Configurable Parameters: Adjust maximum tokens for prompts and responses to suit your needs.
Installation
pip install git-vector
Usage
-
Set Up Environment Variables:
Export your OpenAI API key as an environment variable (or use a
.envfile):export OPENAI_API_KEY=your_api_key_here -
Run the Application:
git-vector --repo-dir /path/to/your/git/repositoryThis will start the intera`tive CLI for the user to chat with the codebase.
Configuration
--repo-dir: (Required) The path to the Git repository.--embedding-model: The OpenAI model to use for embeddings (default:text-embedding-3-small).--chat-model: The OpenAI model to use for chat completions (default:gpt-4o-mini).--max-prompt-tokens: Maximum number of tokens for the prompt (default:2000).--max-response-tokens: Maximum number of tokens for the response (default:500).
License
This project is licensed under the MIT License. See the LICENSE file for details.
Author
- Markus Blomqvist - blomqvist_markus@hotmail.com
Acknowledgments
- OpenAI for providing the API that powers this tool.
- GitPython for interacting with Git repositories.
- NumPy and scikit-learn for numerical and machine learning 2024-09-25 00:12:15,639 [INFO] Response provided to the user.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file git_vector-0.1.0rc1.tar.gz.
File metadata
- Download URL: git_vector-0.1.0rc1.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dd6b2227022baf47e49ed947300b5cbbedec100d77f113edb6ff8f434b5aba5
|
|
| MD5 |
1df06dd62fd88a0c5fa25cd5d566542d
|
|
| BLAKE2b-256 |
220fdd3db7d7559a1e58ce0826a63c58c629b0017868d8642e5ba95a4bcf222d
|
File details
Details for the file git_vector-0.1.0rc1-py3-none-any.whl.
File metadata
- Download URL: git_vector-0.1.0rc1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2de2fa1f829bd7e875140d3e3d3e71aa409006ce5b11b19207a470f935bda3a1
|
|
| MD5 |
8fe829ad8607c9e600b23b5af0ca30b2
|
|
| BLAKE2b-256 |
8ec144a5a11b29631ba9b00ff48b37ea0a123948f7dd470999598e7bf82857b3
|