Skip to content

Commit 12a5549

Browse files
committed
add run.sh file
1 parent 5575c49 commit 12a5549

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

guides/prompt_versioning/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Prompt Versioning
22

33
Version prompts in the Opik Prompt Library, compare versions for hallucination before you
4-
ship one, then run inference against whichever version is currently the latest commit
4+
ship one, then run inference against whichever version is currently the latest commit
55
without hardcoding the prompt text into your application.
66

77
## What this does
@@ -27,7 +27,7 @@ a real OpenAI call.
2727
## Prerequisites
2828

2929
```bash
30-
uv sync # or: pip install "opik>=2.0.74" "openai>=1.0"
30+
uv sync # or: uv pip install "opik>=2.0.74" "openai>=1.0"
3131
```
3232

3333
| Variable | Required for | Description |
@@ -55,6 +55,8 @@ uv run python evaluate.py # commits 2 versions of 'summarizer-fintech', logs
5555
uv run python inference.py # fetches the latest 'fintech-assistant' commit, runs it via OpenAI
5656
```
5757

58+
Or just run `./run.sh` to do all three in sequence
59+
5860
## How it works
5961

6062
1. **`prompts.py`** holds plain prompt strings — no Opik calls. Two pairs of versions: a loose

guides/prompt_versioning/run.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
# Entry point CI runs for this example. With no Opik/OpenAI credentials each script falls
5+
# back to DRY_RUN and exits 0 (the secrets-free check); with credentials set it runs live —
6+
# versioning prompts in Opik, evaluating versions for hallucination, then running inference
7+
# against the latest committed version via the OpenAI SDK.
8+
uv sync
9+
uv run python version.py
10+
uv run python inference.py
11+
uv run python evaluate.py

0 commit comments

Comments
 (0)