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.tools.yaml 1.3 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
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. description: 'Function calling demonstration'
  3. prompts: '{{query}}'
  4. providers:
  5. - id: 'google:live:gemini-2.0-flash-exp'
  6. config:
  7. tools: file://tools.json
  8. generationConfig:
  9. response_modalities: ['text']
  10. timeoutMs: 10000
  11. tests:
  12. # Example of non-built-in tool that the user must execute
  13. - vars:
  14. query: What is the weather in {{location}}?
  15. location: San Francisco
  16. assert:
  17. - type: is-valid-function-call
  18. - type: equals
  19. value: get_weather
  20. transform: output.toolCall.functionCalls[0].name
  21. - type: similar
  22. value: '{{location}}'
  23. threshold: 0.9
  24. transform: output.toolCall.functionCalls[0].args.city
  25. # Example of built-in google search tool that is executed by live
  26. - vars:
  27. query: google search for why the sea is salty
  28. assert:
  29. - type: icontains
  30. value: salt
  31. transform: output.text
  32. - type: icontains-any
  33. value:
  34. - 'weathering'
  35. - 'rainwater'
  36. transform: output.text
  37. # Example of built-in tool code execution that is executed by live
  38. - vars:
  39. query: calculate the result of multiplying 1341 by 23
  40. assert:
  41. - type: icontains
  42. value: 30843
  43. transform: output.text
Tip!

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

Comments

Loading...