-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from dtbuchholz/dtb/improve-setup-process
Improve setup process
- Loading branch information
Showing
7 changed files
with
57 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
OPENAI_API_KEY=your_api_key | ||
ACTIVELOOP_TOKEN=your_api_key | ||
DEEPLAKE_USERNAME=your_username | ||
DEEPLAKE_DATASET_PATH=your_hub_path | ||
DEEPLAKE_REPO_NAME=your_repo_name | ||
REPO_URL=your_github_repo_url | ||
SITE_TITLE="Your Site Title" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
gumroad | ||
.env | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,28 @@ | ||
# Chat-with-Github-Repo | ||
|
||
This repository contains two Python scripts that demonstrate how to create a chatbot using Streamlit, OpenAI GPT-3.5-turbo, and DeepLake. | ||
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. | ||
|
||
The chatbot searches a dataset stored in DeepLake to find relevant information and generates responses based on the user's input. | ||
The chatbot searches a dataset stored in Deep Lake to find relevant information and generates responses based on the user's input. | ||
|
||
## Files | ||
github.py: This script clones a git repository, processes the text documents, computes embeddings using OpenAIEmbeddings, and stores the embeddings in a DeepLake instance. | ||
|
||
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. | ||
`github.py`: This script clones a git repository, processes the text documents, computes embeddings using OpenAIEmbeddings, and stores the embeddings in a DeepLake instance. | ||
|
||
`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. | ||
|
||
## Setup | ||
To set up and run this project, follow these steps: | ||
|
||
Run the github.py script to embed the github repo first | ||
Before getting started, be sure to sign up for an [Activeloop](https://www.activeloop.ai/) and [OpenAI](https://openai.com/) account and create API keys. You'll also want to create a Deep Lake dataset, which will generate a dataset path in the format `hub://{username}/{repo_name}` (where you define the `repo_name`). | ||
|
||
This is how you run the streamlit app: | ||
To set up and run this project, follow these steps: | ||
|
||
``` | ||
streamlit run chat.py | ||
``` | ||
1. Install the required packages with `pip`: | ||
``` | ||
pip install -r requirements.txt | ||
``` | ||
2. Copy the `.env.example` file to `.env` and replace the variables, including API keys, GitHub URL, and site / Deep Lake information. | ||
3. Run the `github.py` script to embed the GitHub repo, thus, storing the data in the specified Activeloop Deep Lake. | ||
4. Run the Streamlit chat app, which should default to `http://localhost:8502` and allow you to ask questions about the repo: | ||
``` | ||
streamlit run chat.py | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
streamlit | ||
streamlit_chat | ||
langchain | ||
openai | ||
python-dotenv | ||
deeplake |