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

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

Comments

Loading...