Any parameter in callModel can be a function that computes its value based on conversation context. This enables adaptive behavior - changing models, adjusting temperature, or modifying instructions as the conversation evolves.
Pass a function instead of a static value:
Parameter functions receive a TurnContext and return the parameter value:
Functions can be async for fetching external data:
Start with a fast model, upgrade for complex tasks:
Adjust creativity based on context:
Build instructions based on conversation state:
Adjust output length based on task:
Enable features dynamically:
Dynamic parameters work alongside tool execution:
Dynamic parameters are resolved at the start of each turn:
Handle errors in async parameter functions:
Avoid side effects in parameter functions:
Cache results for repeated calls:
Always have fallback values: