Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

promptfooconfig.yaml 680 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. description: Extension Hook Example
  3. prompts:
  4. - 'Rephrase this in {{language}}: {{body}}'
  5. providers:
  6. - openai:gpt-4o-mini
  7. extensions:
  8. - file://hooks.py:extension_hook
  9. # - file://hooks.js:extensionHook
  10. tests:
  11. - vars:
  12. body: 'Hello, how are you?'
  13. language: 'Norwegian'
  14. assert:
  15. - type: contains-any
  16. value:
  17. - 'Hallo'
  18. - 'Hei'
  19. - 'Hå'
  20. - type: not-contains
  21. value: 'Hello'
  22. - vars:
  23. body: 'I love sailing on the sea.'
  24. language: 'French'
  25. assert:
  26. - type: llm-rubric
  27. value: 'The response is in French'
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...