forked from ScottLogic/InferLLM
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move promptfoo to its own folder in /backend. Load OpenAI key from en…
…v file. Simplify test structure so less utility .py classes are needed
- Loading branch information
1 parent
20b1ad0
commit cbb7644
Showing
6 changed files
with
35 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Promptfoo | ||
|
||
Promptfoo is a CLI and library for evaluating and red-teaming LLM apps. | ||
|
||
See https://www.promptfoo.dev/docs/intro/ | ||
|
||
## Setup | ||
|
||
### Install Promptfoo | ||
Install promptfoo by running `npx install promptfoo` | ||
|
||
### Activate Python venv | ||
Promptfoo must be run in a python virtual environment as python is used to load the jinja prompt templates. | ||
See [Running Locally](../README.md) | ||
|
||
## Run Promptfoo | ||
Promptfoo configuration (e.g. LLM model) can be set in `promptfooconfig.yaml` | ||
|
||
* Use `promptfoo eval` to run all promptfoo tests. | ||
* Use `promptfoo eval -c generate_message_suggestions_config.yaml` to run a specific test suite. | ||
* Use `promptfoo view` to view the results in browser. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 9 additions & 2 deletions
11
...et_generate_message_suggestions_prompt.py → backend/promtfoo/prompt_foo_runner.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.