Skip to content

Commit d1d608d

Browse files
authored
docs: Enhance example/chatbot with added instructions (#3506)
# Description Instructions in README of example/chatbot is a little out-dated. Updated it to match the latest codebase. ## Checklist before requesting a review Please delete options that are not relevant. - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented hard-to-understand areas - [x] I have ideally added tests that prove my fix is effective or that my feature works ## Screenshots (if appropriate): NA
1 parent d20f58c commit d1d608d

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

core/quivr_core/rag/entities/config.py

+1
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ def set_api_key(self, force_reset: bool = False):
230230

231231
if not self.llm_api_key:
232232
logger.warning(f"The API key for supplier '{self.supplier}' is not set. ")
233+
logger.warning(f"Please set the environment variable: '{self.env_variable_name}'. ")
233234

234235
def set_llm_model_config(self):
235236
# Automatically set context_length and tokenizer_hub based on the supplier and model

examples/chatbot/README.md

+14-5
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,32 @@ This example demonstrates how to create a simple chatbot using Quivr and Chainli
88

99
## Installation
1010

11-
1. Clone the repository or navigate to the `core/examples/chatbot` directory.
11+
1. Clone the repository and navigate to the `examples/chatbot` directory.
1212

13-
2. Install the required dependencies:
13+
2. Make sure you have [rye](https://rye.astral.sh/) installed.
1414

15+
3. Install the requirements using `rye`:
16+
17+
```sh
18+
rye sync
1519
```
16-
pip install -r requirements.lock
20+
4. Activate the venv
21+
22+
```sh
23+
source ./venv/bin/activate
1724
```
1825

1926
## Running the Chatbot
2027

21-
1. Start the Chainlit server:
28+
1. Define your API key as environment variable. e.g. `export OPENAI_API_KEY=your-key-here`
29+
30+
2. Start the Chainlit server:
2231

2332
```
2433
chainlit run main.py
2534
```
2635

27-
2. Open your web browser and go to the URL displayed in the terminal (usually `http://localhost:8000`).
36+
3. Open your web browser and go to the URL displayed in the terminal (usually `http://localhost:8000`).
2837

2938
## Using the Chatbot
3039

0 commit comments

Comments
 (0)