Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Enhance example/chatbot with added instructions #3506

Merged
merged 2 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/quivr_core/rag/entities/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ def set_api_key(self, force_reset: bool = False):

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

def set_llm_model_config(self):
# Automatically set context_length and tokenizer_hub based on the supplier and model
Expand Down
19 changes: 14 additions & 5 deletions examples/chatbot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,32 @@ This example demonstrates how to create a simple chatbot using Quivr and Chainli

## Installation

1. Clone the repository or navigate to the `core/examples/chatbot` directory.
1. Clone the repository and navigate to the `examples/chatbot` directory.

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

3. Install the requirements using `rye`:

```sh
rye sync
```
pip install -r requirements.lock
4. Activate the venv

```sh
source ./venv/bin/activate
```

## Running the Chatbot

1. Start the Chainlit server:
1. Define your API key as environment variable. e.g. `export OPENAI_API_KEY=your-key-here`

2. Start the Chainlit server:

```
chainlit run main.py
```

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

## Using the Chatbot

Expand Down
Loading