Spaces:
Running
Running
Mihail Eric commited on
Commit ·
505541d
1
Parent(s): d5c979a
update readme
Browse files
README.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
| 1 |
-
#
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
```
|
| 4 |
pip install -r requirements.txt
|
| 5 |
|
|
@@ -11,17 +28,21 @@ export PINECONE_INDEX_NAME=...
|
|
| 11 |
python src/index.py $GITHUB_REPO_NAME --pinecone_index_name=$PINECONE_INDEX_NAME
|
| 12 |
python src/chat.py $GITHUB_REPO_NAME --pinecone_index_name=$PINECONE_INDEX_NAME
|
| 13 |
```
|
| 14 |
-
This will index your entire codebase in a vector DB, then bring up a `gradio` app where you can ask questions about it.
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
| 17 |
```
|
| 18 |
python src/chat.py $GITHUB_REPO_NAME --share=true ...
|
| 19 |
```
|
| 20 |
|
|
|
|
|
|
|
| 21 |
Here is, for example, a conversation about the repo [Storia-AI/image-eval](https://github.com/Storia-AI/image-eval):
|
| 22 |

|
| 23 |
|
| 24 |
-
#
|
| 25 |
|
| 26 |
## Indexing the repo
|
| 27 |
The `src/index.py` script performs the following steps:
|
|
|
|
| 1 |
+
# What is this?
|
| 2 |
+
|
| 3 |
+

|
| 4 |
+
|
| 5 |
+
*TL;DR*: `repo2vec` is a simple-to-use, modular library enabling you to chat with any public codebase.
|
| 6 |
+
|
| 7 |
+
**Ok, but why chat with a codebase?**
|
| 8 |
+
|
| 9 |
+
Sometimes you just want to learn how a codebase works and how to integrate it, without spending hours sifting through
|
| 10 |
+
the code itself.
|
| 11 |
+
|
| 12 |
+
`repo2vec` is like Github Copilot but with the most up-to-date information about your repo.
|
| 13 |
+
|
| 14 |
+
Features:
|
| 15 |
+
- **Dead-simple set-up.** Run *two scripts* and you have a functional chat interface for your code. That's really it.
|
| 16 |
+
- **Heavily documented answers.** Every response shows where in the code the context for the answer was pulled from. Let's build trust in the AI.
|
| 17 |
+
- **Plug-and-play.** Want to improve the algorithms powering the code understanding/generation? We've made every component of the pipeline easily swappable. Customize to your heart's content.
|
| 18 |
+
|
| 19 |
+
Here are the two scripts you need to run:
|
| 20 |
```
|
| 21 |
pip install -r requirements.txt
|
| 22 |
|
|
|
|
| 28 |
python src/index.py $GITHUB_REPO_NAME --pinecone_index_name=$PINECONE_INDEX_NAME
|
| 29 |
python src/chat.py $GITHUB_REPO_NAME --pinecone_index_name=$PINECONE_INDEX_NAME
|
| 30 |
```
|
| 31 |
+
This will index your entire codebase in a vector DB, then bring up a `gradio` app where you can ask questions about it.
|
| 32 |
|
| 33 |
+
The assistant responses always include GitHub links to the documents retrieved for each query.
|
| 34 |
+
|
| 35 |
+
If you want to publicly host your chat experience, set `--share=true`:
|
| 36 |
```
|
| 37 |
python src/chat.py $GITHUB_REPO_NAME --share=true ...
|
| 38 |
```
|
| 39 |
|
| 40 |
+
That's seriously it.
|
| 41 |
+
|
| 42 |
Here is, for example, a conversation about the repo [Storia-AI/image-eval](https://github.com/Storia-AI/image-eval):
|
| 43 |

|
| 44 |
|
| 45 |
+
# Peaking under the hood
|
| 46 |
|
| 47 |
## Indexing the repo
|
| 48 |
The `src/index.py` script performs the following steps:
|