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.4 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
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. # Learn more about building a configuration: https://promptfoo.dev/docs/configuration/guide
  3. description: 'Function calling with Google AI Studio Gemini models'
  4. prompts:
  5. - What is the weather in {{location}}?
  6. providers:
  7. - id: 'google:gemini-2.0-flash-001'
  8. config:
  9. tools: file://tools.json
  10. defaultTest:
  11. options:
  12. # This overrides the default grading providers with Vertex AI models
  13. providers:
  14. embedding: 'google:embedding:text-embedding-005'
  15. text: 'google:gemini-2.0-flash-001'
  16. tests:
  17. # Function calling tests
  18. - vars:
  19. location: San Francisco
  20. assert:
  21. - type: is-valid-function-call
  22. - type: equals
  23. value: get_current_weather
  24. # Transform is a cleaner way to pick out specific properties
  25. transform: output[0].functionCall.name
  26. - type: similar
  27. value: '{{location}}'
  28. threshold: 0.9
  29. # Transform returns only the parsed location argument
  30. transform: output[0].functionCall.args.location
  31. - vars:
  32. location: New York
  33. assert:
  34. - type: is-valid-function-call
  35. - type: equals
  36. value: get_current_weather
  37. transform: output[0].functionCall.name
  38. - type: similar
  39. value: '{{location}}'
  40. threshold: 0.9
  41. transform: output[0].functionCall.args.location
Tip!

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

Comments

Loading...