8000 GitHub - vishn9893/Bitbucket-RAG: This is an unofficial integration of Bitbucket repository (on-prem) with Large Language Models for creating RAG Applications
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

This is an unofficial integration of Bitbucket repository (on-prem) with Large Language Models for creating RAG Applications

Notifications You must be signed in to change notification settings

vishn9893/Bitbucket-RAG

Repository files navigation

README

Overview

This application connects to a Bitbucket repository, retrieves repository data, and uses a pre-trained model from Hugging Face (Mistral-7B-Instruct-v0.2) to answer queries based on the repository content.

Files

  • app.py: Main application script that initializes the Bitbucket connection, retrieves repository data, and processes user queries using the Mistral-7B-Instruct-v0.2 model.
  • requirements.txt: List of dependencies required to run the application.
  • .env: Environment configuration file (not included in the repository; you need to create this with your specific configuration).

Dependencies

  • transformers: Hugging Face Transformers library for model loading and processing.
  • atlassian-python-api: Python API client for Bitbucket.
  • truststore: Ensures SSL certificate validation.
  • python-dotenv: Loads environment variables from a .env file.

Environment Variables

Create a .env file in the root directory of your project with the following variables:

BITBUCKET_URL=<your-bitbucket-url>
BITBUCKET_USERNAME=<your-bitbucket-username>
BITBUCKET_PASSWORD=<your-bitbucket-password>
PROJECT_KEY=<your-bitbucket-project-key>
REPO_SLUG=<your-bitbucket-repo-slug>

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-directory>
  2. Create and activate a virtual environment:

    python3 -m venv myenv
    source myenv/bin/activate  # On Windows, use `myenv\Scripts\activate`
  3. Install the dependencies:

    pip install -r requirements.txt
  4. Set up your .env file with the necessary environment variables.

Usage

Run the application using the following command:

python app.py

Troubleshooting

Authentication Errors

Ensure your Bitbucket credentials and access token are correctly set in the .env file. Verify the values of BITBUCKET_URL, BITBUCKET_USERNAME, and BITBUCKET_PASSWORD.

Model Download Issues

If downloading the model during execution is problematic, pre-download the model files from Hugging Face and place them in the appropriate directory. Ensure the directory structure matches the expected format.

Connection Errors

Verify your network connection and ensure that the Bitbucket server URL is accessible. Check if the BITBUCKET_URL in your .env file is correct and reachable.

SSL Errors

Ensure SSL certificate validation by using the truststore package. If you encounter SSL errors, check your certificate configurations and network settings.

Example

Here's an example of how the .env file should look:

BITBUCKET_URL=https://your-bitbucket-server-url
BITBUCKET_USERNAME=your-username
BITBUCKET_PASSWORD=your-password
PROJECT_KEY=your-project-key
REPO_SLUG=your-repo-slug

This example sets up the necessary environment variables to authenticate and connect to your Bitbucket repository.

About

This is an unofficial integration of Bitbucket repository (on-prem) with Large Language Models for creating RAG Applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0