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.statefulapi.yaml 779 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
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. description: 'Example for mocking a stateful python api'
  3. prompts: '{{query}}'
  4. providers:
  5. - id: 'google:live:gemini-2.0-flash-exp'
  6. config:
  7. tools: file://tools.json
  8. functionToolStatefulApi:
  9. file: examples/google-live/counter_api.py
  10. url: http://127.0.0.1:8765
  11. # Optionally specify a custom Python executable path
  12. # pythonExecutable: '/usr/local/bin/python3'
  13. generationConfig:
  14. response_modalities: ['text']
  15. timeoutMs: 10000
  16. tests:
  17. - vars:
  18. query: Add to the counter until it reaches 5
  19. assert:
  20. - type: is-valid-function-call
  21. - type: equals
  22. value: { 'counter': 5 }
  23. transform: output.statefulApiState
Tip!

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

Comments

Loading...