Skip to main content

Prompt OpenAI models with git repository context

Project description

Git-Vector

License: MIT

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

  1. Set Up Environment Variables:

    Export your OpenAI API key as an environment variable (or use a .env file):

    export OPENAI_API_KEY=your_api_key_here
    
  2. Run the Application:

    git-vector --repo-dir /path/to/your/git/repository
    

    This 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

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


Download files

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

Source Distribution

git_vector-0.1.0rc1.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

git_vector-0.1.0rc1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

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

Hashes for git_vector-0.1.0rc1.tar.gz
Algorithm Hash digest
SHA256 3dd6b2227022baf47e49ed947300b5cbbedec100d77f113edb6ff8f434b5aba5
MD5 1df06dd62fd88a0c5fa25cd5d566542d
BLAKE2b-256 220fdd3db7d7559a1e58ce0826a63c58c629b0017868d8642e5ba95a4bcf222d

See more details on using hashes here.

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

Hashes for git_vector-0.1.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 2de2fa1f829bd7e875140d3e3d3e71aa409006ce5b11b19207a470f935bda3a1
MD5 8fe829ad8607c9e600b23b5af0ca30b2
BLAKE2b-256 8ec144a5a11b29631ba9b00ff48b37ea0a123948f7dd470999598e7bf82857b3

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