Spaces:
Runtime error
Runtime error
Added README
Browse files
README.md
CHANGED
|
@@ -1 +1,65 @@
|
|
| 1 |
-
# ReferenceBot
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ReferenceBot
|
| 2 |
+
|
| 3 |
+
## Installation
|
| 4 |
+
|
| 5 |
+
Follow the instructions below to run the Streamlit server locally.
|
| 6 |
+
|
| 7 |
+
### Pre-requisites
|
| 8 |
+
|
| 9 |
+
Make sure you have Python `≥3.10` installed.
|
| 10 |
+
|
| 11 |
+
### Steps
|
| 12 |
+
|
| 13 |
+
These instructions were tested on macOS 13.6 Ventura with ARM CPU and Python `3.10.11`.
|
| 14 |
+
|
| 15 |
+
1. Clone the repository:
|
| 16 |
+
|
| 17 |
+
```bash
|
| 18 |
+
git clone https://github.com/andreped/ReferenceBot
|
| 19 |
+
cd ReferenceBot
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
2. Setup virtual environment and install dependencies:
|
| 23 |
+
|
| 24 |
+
```bash
|
| 25 |
+
python3 -m venv venv
|
| 26 |
+
source venv/bin/activate
|
| 27 |
+
pip install -r requirements.txt
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
3. Create the secrets file at `.streamlit/secrets.toml` and fill in the relevant info:
|
| 31 |
+
|
| 32 |
+
```bash
|
| 33 |
+
OPENAI_API_KEY = "<insert OpenAI API key>"
|
| 34 |
+
CHATGPT_MODEL = "<insert model name>"
|
| 35 |
+
OPENAI_API_BASE = "https://<insert-openai-service-name>.openai.azure.com"
|
| 36 |
+
OPENAI_API_VERSION = "<insert version>"
|
| 37 |
+
ENGINE = "<insert deployment model name>"
|
| 38 |
+
ENGINE_EMBEDDING = "<insert deployment embedding name>"
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
4. Run the Streamlit server
|
| 42 |
+
|
| 43 |
+
```bash
|
| 44 |
+
streamlit run knowledge_gpt/main.py
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
## Build with Docker
|
| 48 |
+
|
| 49 |
+
Run the following commands to build and run the Docker image.
|
| 50 |
+
|
| 51 |
+
```bash
|
| 52 |
+
cd knowledge_gpt
|
| 53 |
+
docker build -t ReferenceBot .
|
| 54 |
+
docker run -p 8501:8501 ReferenceBot
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
Open http://localhost:8501 in your browser to access the app.
|
| 58 |
+
|
| 59 |
+
## Acknowledgements
|
| 60 |
+
|
| 61 |
+
We have built on-top of [KnowledgeGPT](https://github.com/mmz-001/knowledge_gpt) to enable the tool be be used with Azure OpenAI Services. Thus, all credit should go towards the original developers.
|
| 62 |
+
|
| 63 |
+
## License
|
| 64 |
+
|
| 65 |
+
Distributed under the MIT License. See [LICENSE](https://github.com/andreped/ReferenceBot/blob/main/LICENSE) for more information.
|