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 1014 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
32
33
34
35
36
37
38
39
40
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. description: 'Headless eval'
  3. prompts:
  4. - 'Write a tweet about {{topic}}'
  5. providers:
  6. - id: browser
  7. config:
  8. headless: true # set to false to see the browser
  9. steps:
  10. # Load the page
  11. - action: navigate
  12. args:
  13. url: 'https://doc-chat-llm.streamlit.app/~/+/'
  14. # Enter the message
  15. - action: type
  16. args:
  17. selector: 'textarea'
  18. text: '{{prompt}}'
  19. # Send the message
  20. - action: click
  21. args:
  22. selector: 'button[data-testid="stChatInputSubmitButton"]'
  23. # Wait for the response
  24. - action: wait
  25. args:
  26. ms: 5000
  27. # Read the response
  28. - action: extract
  29. args:
  30. selector: 'div.stChatMessage:last-of-type'
  31. name: response
  32. transformResponse: 'extracted.response'
  33. tests:
  34. - vars:
  35. topic: bananas
  36. - vars:
  37. topic: avocado toast
Tip!

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

Comments

Loading...