Supported Types
ToolChoiceAuto
ToolChoiceAny
ToolChoiceNone
ToolChoiceTool
Union Discrimination
Use theType field to determine which variant is active, then access the corresponding field:
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
toolChoice := components.CreateToolChoiceAuto(components.ToolChoiceAuto{/* values here */})
toolChoice := components.CreateToolChoiceAny(components.ToolChoiceAny{/* values here */})
toolChoice := components.CreateToolChoiceNone(components.ToolChoiceNone{/* values here */})
toolChoice := components.CreateToolChoiceTool(components.ToolChoiceTool{/* values here */})
Type field to determine which variant is active, then access the corresponding field:
switch toolChoice.Type {
case components.ToolChoiceTypeAutoValue:
// toolChoice.ToolChoiceAuto is populated
case components.ToolChoiceTypeAny:
// toolChoice.ToolChoiceAny is populated
case components.ToolChoiceTypeNone:
// toolChoice.ToolChoiceNone is populated
case components.ToolChoiceTypeTool:
// toolChoice.ToolChoiceTool is populated
}