Skip to content

Commit

Permalink
tidy up response synthesis args and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
morganmcg1 committed Jan 19, 2025
1 parent 6d93e4f commit d50618e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
15 changes: 3 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,7 @@ poetry install

**Environment variables**

Make sure to set the environment variables (i.e. LLM provider keys etc) from the .env file in your terminal:

```bash
set -o allexport
source .env
set +o allexport
```
Make sure to set the environment variables (i.e. LLM provider keys etc) from the `.env` file.

**Launch the wandbot app**
You can either use `uvicorn` or `gunicorn` to launch N workers to be able to serve eval requests in parallel. Note that weave Evaluations also have a limit on the number of parallel calls make, set via the `WEAVE_PARALLELISM` env variable, which is set further down in the `eval.py` file using the `n_weave_parallelism` flag. Launch wandbot with 8 workers for faster evaluation. The `WANDBOT_FULL_INIT` env var triggers the full wandbot app initialization.
Expand All @@ -169,7 +163,7 @@ WANDBOT_FULL_INIT=1 uvicorn wandbot.api.app:app \
--log-level debug
```

gunicorn:
alternatively you can also run wandbot with `gunicorn`:

```bash
WANDBOT_FULL_INIT=1 \
Expand All @@ -191,10 +185,7 @@ curl -X POST \
```

**Debugging**
For debugging purposes during evaluation you can run a single instance of the app using this command
```
uvicorn wandbot.api.app:app --host="0.0.0.0" --port=8000 \
--workers 1 --timeout-keep-alive 75 --loop uvloop --http httptools --log-level debug
For debugging purposes during evaluation you can run a single instance of the app by chaning the `uvicorn` command above to use `--workers 1`
```
**Run the evaluation**
Expand Down
8 changes: 4 additions & 4 deletions src/wandbot/rag/response_synthesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ class ResponseSynthesizer:

def __init__(
self,
model: str = "gpt-4-0125-preview",
temperature: float = 0.1,
fallback_model: str = "gpt-4-0125-preview",
fallback_temperature: float = 0.1,
model: str,
temperature: float,
fallback_model: str,
fallback_temperature: float,
):
self.model = {"model_name": model, "temperature": temperature} # type: ignore
self.fallback_model = {"model_name": fallback_model, "temperature": fallback_temperature} # type: ignore
Expand Down

0 comments on commit d50618e

Please sign in to comment.