• Stars
    star
    1,119
  • Rank 41,531 (Top 0.9 %)
  • Language
    Python
  • License
    MIT License
  • Created over 1 year ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This repository contains two Python scripts that demonstrate how to create a chatbot using Streamlit, OpenAI GPT-3.5-turbo, and Activeloop's Deep Lake.

Chat-with-Github-Repo

This repository contains Python scripts that demonstrate how to create a chatbot using Streamlit, OpenAI GPT-3.5-turbo, and Activeloop's Deep Lake.

The chatbot searches a dataset stored in Deep Lake to find relevant information from any Git repository and generates responses based on the user's input.

Files

  • src/utils/process.py: This script clones a Git repository, processes the text documents, computes embeddings using OpenAIEmbeddings, and stores the embeddings in a DeepLake instance.

  • src/utils/chat.py: This script creates a Streamlit web application that interacts with the user and the DeepLake instance to generate chatbot responses using OpenAI GPT-3.5-turbo.

  • src/main.py: This script contains the command line interface (CLI) that allows you to run the chatbot application.

Setup

Before getting started, be sure to sign up for an Activeloop and OpenAI account and create API keys.

To set up and run this project, follow these steps:

  1. Clone the repository and navigate to the project directory:
git clone https://github.com/peterw/Chat-with-Git-Repo.git
cd Chat-with-Git-Repo
  1. Install the required packages with pip:
pip install -r requirements.txt

For development dependencies, you can install them using the following command:

pip install -r dev-requirements.txt
  1. Set the environment variables:

Copy the .env.example file:

cp .env.example .env

Provide your API keys and username:

OPENAI_API_KEY=your_openai_api_key
ACTIVELOOP_TOKEN=your_activeloop_api_token
ACTIVELOOP_USERNAME=your_activeloop_username
  1. Use the CLI to run the chatbot application. You can either process a Git repository or start the chat application using an existing dataset.

For complete CLI instructions run python src/main.py --help

To process a Git repository, use the process subcommand:

python src/main.py process --repo-url https://github.com/username/repo_name

You can also specify additional options, such as file extensions to include while processing the repository, the name for the Activeloop dataset, or the destination to clone the repository:

python src/main.py process --repo-url https://github.com/username/repo_name --include-file-extensions .md .txt --activeloop-dataset-name my-dataset --repo-destination repos

To start the chat application using an existing dataset, use the chat subcommand:

python src/main.py chat --activeloop-dataset-name my-dataset

The Streamlit chat app will run, and you can interact with the chatbot at http://localhost:8501 (or the next available port) to ask questions about the repository.

Sponsors

โœจ Learn to build projects like this one (early bird discount): BuildFast Course

License

MIT License

More Repositories

1

Gumroad-Landing-Page-Generator

This project is a Python script that scrapes data from a Gumroad site, generates a colorful and well-designed HTML page using OpenAI's GPT-4 model, and deploys the generated page to Vercel.
Python
370
star
2

StoryStorm

Introducing Story Storm, a powerful tool that harnesses the power of OpenAI's GPT-3.5 Turbo API to generate fascinating and engaging stories.
Python
150
star
3

JarvisBase

Question-answering chatbot using OpenAI's GPT-3.5-turbo model, DeepLake for the vector database, and the Whisper API for voice transcription. The chatbot also uses Eleven Labs to generate audio responses.
Python
149
star
4

llamav2-chat

This is a simple, interactive chat application powered by Streamlit and the Replicate LlamaV2 model. It uses Streamlit for the front end interface and Replicate's LlamaV2 model for generating responses based on user input.
Python
70
star
5

autogen

Python
21
star
6

NotionWizard

This is a simple Notion Page Assistant that uses OpenAI's functions to create a Notion page.
Python
19
star
7

Drake-Bling-Bakery

This project is a Drake Hotline Bling meme generator using GPT-4 and Streamlit. The generator takes a user's input and generates a meme with two options, where the first option is less desirable and the second option is more desirable.
Python
16
star
8

buildfast-1

Python
6
star
9

isms

5
star
10

streamlit-and-zapier-nla

This project is a Streamlit application that uses Zapier's NLA and OpenAI to process user instructions. The application mainly interacts with Google Docs based on the processed instructions and performs actions like creating a new doc, generating content and adding the content to the doc.
Python
4
star
11

project1

Python
2
star
12

ai_profile-

HTML
2
star
13

fine-tuning

Python
1
star
14

vectordb-project

Python
1
star
15

project2

Python
1
star
16

agora-copy

1
star
17

playlist-hunt

Hub to find new & interesting Spotify playlists!
JavaScript
1
star