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-function.yaml 977 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
27
28
29
30
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. description: Azure OpenAI Assistant with Function Tool Capability
  3. prompts:
  4. - 'Answer the following question: {{prompt}}'
  5. providers:
  6. - id: azure:assistant:your_assistant_id
  7. label: azure-assistant-function
  8. config:
  9. apiHost: your-resource-name.openai.azure.com
  10. # Load tools from external file
  11. tools: file://tools/weather-function.json
  12. # Use the external file-based callback
  13. functionToolCallbacks:
  14. get_weather: file://callbacks/weather.js:getWeather
  15. temperature: 0.7
  16. apiVersion: '2024-05-01-preview'
  17. debug: true
  18. tests:
  19. # Function tool invocation tests
  20. - vars:
  21. prompt: What's the weather like in Seattle?
  22. - vars:
  23. prompt: Tell me about the weather in Tokyo in Celsius.
  24. - vars:
  25. prompt: Compare the weather in New York and London.
  26. - vars:
  27. prompt: What's the weather forecast for San Francisco in Fahrenheit?
Tip!

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

Comments

Loading...