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 1.5 KB

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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
  1. prompts:
  2. - 'What is the weather like in {{city}}?'
  3. providers:
  4. - id: adaline:openai:chat:gpt-4o-mini
  5. config:
  6. tools:
  7. [
  8. {
  9. type: 'function',
  10. definition:
  11. {
  12. schema:
  13. {
  14. name: 'get_weather_from_location',
  15. description: 'Get the current weather of a location',
  16. parameters:
  17. {
  18. type: 'object',
  19. properties:
  20. {
  21. location: { type: 'string', description: 'location to get weather of' },
  22. },
  23. required: ['location'],
  24. },
  25. },
  26. },
  27. },
  28. ]
  29. tests:
  30. - vars:
  31. city: Boston
  32. assert:
  33. - type: is-json
  34. - type: javascript
  35. value: output[0].name === 'get_weather_from_location'
  36. - type: javascript
  37. value: JSON.parse(output[0].arguments).location === 'Boston'
  38. - vars:
  39. city: New York
  40. options:
  41. transform: output[0].name
  42. assert:
  43. - type: equals
  44. value: get_weather_from_location
  45. - vars:
  46. city: Paris
  47. assert:
  48. - type: equals
  49. value: get_weather_from_location
  50. transform: output[0].name
  51. - type: similar
  52. value: Paris, France
  53. threshold: 0.5
  54. transform: JSON.parse(output[0].arguments).location
  55. - vars:
  56. city: Mars
Tip!

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

Comments

Loading...