set_nullable_optional_parameters
set_nullable_optional_parameters
Let the model send null for the optional arguments of every tool, as providers
with strict schemas require: their schemas make every argument required, so an
optional argument has to take null instead. With this on, each argument that
isn’t required takes null as well as its type, and a null reaches the handler as
an argument that wasn’t given.
It applies to tools defined with define_tool(), when the SWML is
rendered, so it covers tools defined before or after it. A tool’s own
nullable_optional overrides it.
Parameters
enabled
True to turn it on, False to turn it off.
Returns
AgentBase — Self for method chaining.
Example
The optional unit argument renders as: