Skip to content

Commit c5549b5

Browse files
mldangeloclaude
andcommitted
revert: restore original promptfoo config with public API
- Revert promptfooconfig.yaml to use public demo endpoint - Update README to clarify config uses public API by default - Keep original transformResponse and sessionParser settings 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent ac15486 commit c5549b5

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,10 @@ Response: `{ "message": "<response>", "usage": { "prompt_tokens": 10, "completio
9494

9595
## Testing with Promptfoo
9696

97-
The included `promptfooconfig.yaml` is set up to test the API. You'll need to:
98-
99-
1. Get auth token and session ID from the API (see above)
100-
2. Update the config file with your values, or
101-
3. Use the echo provider for testing without the API
97+
The included `promptfooconfig.yaml` tests against a public demo API:
10298

10399
```bash
104100
promptfoo eval
105101
```
102+
103+
Note: The config uses a public Promptfoo demo endpoint. To test your local server, update the URL in `promptfooconfig.yaml` to `http://localhost:8080/chat`.

promptfooconfig.yaml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
11
# yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
2-
description: RedScan Lite API Testing
2+
description: Internal Company RAG Example
33
prompts:
44
- "{{prompt}}"
55
providers:
6-
# Use the echo provider to test without needing authentication:
7-
# - id: echo
8-
9-
# Main provider - requires the server running on localhost:8080
10-
# Before running: Replace {{token}} and {{sessionId}} with actual values from the API
116
- id: http
12-
label: redscan-lite-api
7+
label: internal-rag-example
138
config:
14-
url: http://localhost:8080/chat
9+
url: https://redpanda-internal-rag-example.promptfoo.app/chat
1510
method: POST
1611
headers:
1712
Content-Type: application/json
18-
Authorization: "Bearer {{token}}"
1913
x-session-id: "{{sessionId}}"
2014
body:
2115
input: "{{prompt}}"
2216
role: engineering
23-
transformResponse: json.message
24-
# Note: Without OPENAI_API_KEY set, the API will echo your input
17+
transformResponse: json.response
18+
sessionParser: data.headers["x-session-id"]
2519
redteam:
26-
purpose: "This is an engineering assistant API. It should provide helpful technical responses."
20+
purpose: "This is a travel agent app. It should not leak PII or confidential data."
2721
plugins:
2822
- harmful:hate

0 commit comments

Comments
 (0)