The Go SDK and docs are currently in beta.
Report issues on GitHub.
Supported Types
ReasoningItem
inputsUnion1 := components.CreateInputsUnion1ReasoningItem(components.ReasoningItem{/* values here */})
EasyInputMessage
inputsUnion1 := components.CreateInputsUnion1EasyInputMessage(components.EasyInputMessage{/* values here */})
InputMessageItem
inputsUnion1 := components.CreateInputsUnion1InputMessageItem(components.InputMessageItem{/* values here */})
FunctionCallItem
inputsUnion1 := components.CreateInputsUnion1FunctionCallItem(components.FunctionCallItem{/* values here */})
FunctionCallOutputItem
inputsUnion1 := components.CreateInputsUnion1FunctionCallOutputItem(components.FunctionCallOutputItem{/* values here */})
ApplyPatchCallItem
inputsUnion1 := components.CreateInputsUnion1ApplyPatchCallItem(components.ApplyPatchCallItem{/* values here */})
ApplyPatchCallOutputItem
inputsUnion1 := components.CreateInputsUnion1ApplyPatchCallOutputItem(components.ApplyPatchCallOutputItem{/* values here */})
InputsMessage
inputsUnion1 := components.CreateInputsUnion1InputsMessage(components.InputsMessage{/* values here */})
InputsReasoning
inputsUnion1 := components.CreateInputsUnion1InputsReasoning(components.InputsReasoning{/* values here */})
OutputFunctionCallItem
inputsUnion1 := components.CreateInputsUnion1OutputFunctionCallItem(components.OutputFunctionCallItem{/* values here */})
OutputCustomToolCallItem
inputsUnion1 := components.CreateInputsUnion1OutputCustomToolCallItem(components.OutputCustomToolCallItem{/* values here */})
OutputWebSearchCallItem
inputsUnion1 := components.CreateInputsUnion1OutputWebSearchCallItem(components.OutputWebSearchCallItem{/* values here */})
OutputFileSearchCallItem
inputsUnion1 := components.CreateInputsUnion1OutputFileSearchCallItem(components.OutputFileSearchCallItem{/* values here */})
OutputImageGenerationCallItem
inputsUnion1 := components.CreateInputsUnion1OutputImageGenerationCallItem(components.OutputImageGenerationCallItem{/* values here */})
OutputCodeInterpreterCallItem
inputsUnion1 := components.CreateInputsUnion1OutputCodeInterpreterCallItem(components.OutputCodeInterpreterCallItem{/* values here */})
OutputComputerCallItem
inputsUnion1 := components.CreateInputsUnion1OutputComputerCallItem(components.OutputComputerCallItem{/* values here */})
OutputDatetimeItem
inputsUnion1 := components.CreateInputsUnion1OutputDatetimeItem(components.OutputDatetimeItem{/* values here */})
OutputWebSearchServerToolItem
inputsUnion1 := components.CreateInputsUnion1OutputWebSearchServerToolItem(components.OutputWebSearchServerToolItem{/* values here */})
OutputCodeInterpreterServerToolItem
inputsUnion1 := components.CreateInputsUnion1OutputCodeInterpreterServerToolItem(components.OutputCodeInterpreterServerToolItem{/* values here */})
OutputFileSearchServerToolItem
inputsUnion1 := components.CreateInputsUnion1OutputFileSearchServerToolItem(components.OutputFileSearchServerToolItem{/* values here */})
OutputImageGenerationServerToolItem
inputsUnion1 := components.CreateInputsUnion1OutputImageGenerationServerToolItem(components.OutputImageGenerationServerToolItem{/* values here */})
OutputBrowserUseServerToolItem
inputsUnion1 := components.CreateInputsUnion1OutputBrowserUseServerToolItem(components.OutputBrowserUseServerToolItem{/* values here */})
OutputBashServerToolItem
inputsUnion1 := components.CreateInputsUnion1OutputBashServerToolItem(components.OutputBashServerToolItem{/* values here */})
OutputTextEditorServerToolItem
inputsUnion1 := components.CreateInputsUnion1OutputTextEditorServerToolItem(components.OutputTextEditorServerToolItem{/* values here */})
OutputApplyPatchServerToolItem
inputsUnion1 := components.CreateInputsUnion1OutputApplyPatchServerToolItem(components.OutputApplyPatchServerToolItem{/* values here */})
OutputWebFetchServerToolItem
inputsUnion1 := components.CreateInputsUnion1OutputWebFetchServerToolItem(components.OutputWebFetchServerToolItem{/* values here */})
OutputToolSearchServerToolItem
inputsUnion1 := components.CreateInputsUnion1OutputToolSearchServerToolItem(components.OutputToolSearchServerToolItem{/* values here */})
OutputMemoryServerToolItem
inputsUnion1 := components.CreateInputsUnion1OutputMemoryServerToolItem(components.OutputMemoryServerToolItem{/* values here */})
OutputMcpServerToolItem
inputsUnion1 := components.CreateInputsUnion1OutputMcpServerToolItem(components.OutputMcpServerToolItem{/* values here */})
OutputSearchModelsServerToolItem
inputsUnion1 := components.CreateInputsUnion1OutputSearchModelsServerToolItem(components.OutputSearchModelsServerToolItem{/* values here */})
LocalShellCallItem
inputsUnion1 := components.CreateInputsUnion1LocalShellCallItem(components.LocalShellCallItem{/* values here */})
LocalShellCallOutputItem
inputsUnion1 := components.CreateInputsUnion1LocalShellCallOutputItem(components.LocalShellCallOutputItem{/* values here */})
ShellCallItem
inputsUnion1 := components.CreateInputsUnion1ShellCallItem(components.ShellCallItem{/* values here */})
ShellCallOutputItem
inputsUnion1 := components.CreateInputsUnion1ShellCallOutputItem(components.ShellCallOutputItem{/* values here */})
McpListToolsItem
inputsUnion1 := components.CreateInputsUnion1McpListToolsItem(components.McpListToolsItem{/* values here */})
McpApprovalRequestItem
inputsUnion1 := components.CreateInputsUnion1McpApprovalRequestItem(components.McpApprovalRequestItem{/* values here */})
McpApprovalResponseItem
inputsUnion1 := components.CreateInputsUnion1McpApprovalResponseItem(components.McpApprovalResponseItem{/* values here */})
McpCallItem
inputsUnion1 := components.CreateInputsUnion1McpCallItem(components.McpCallItem{/* values here */})
CustomToolCallItem
inputsUnion1 := components.CreateInputsUnion1CustomToolCallItem(components.CustomToolCallItem{/* values here */})
CustomToolCallOutputItem
inputsUnion1 := components.CreateInputsUnion1CustomToolCallOutputItem(components.CustomToolCallOutputItem{/* values here */})
CompactionItem
inputsUnion1 := components.CreateInputsUnion1CompactionItem(components.CompactionItem{/* values here */})
ItemReferenceItem
inputsUnion1 := components.CreateInputsUnion1ItemReferenceItem(components.ItemReferenceItem{/* values here */})
Union Discrimination
Use theType field to determine which variant is active, then access the corresponding field:
switch inputsUnion1.Type {
case components.InputsUnion1TypeReasoningItem:
// inputsUnion1.ReasoningItem is populated
case components.InputsUnion1TypeEasyInputMessage:
// inputsUnion1.EasyInputMessage is populated
case components.InputsUnion1TypeInputMessageItem:
// inputsUnion1.InputMessageItem is populated
case components.InputsUnion1TypeFunctionCallItem:
// inputsUnion1.FunctionCallItem is populated
case components.InputsUnion1TypeFunctionCallOutputItem:
// inputsUnion1.FunctionCallOutputItem is populated
case components.InputsUnion1TypeApplyPatchCallItem:
// inputsUnion1.ApplyPatchCallItem is populated
case components.InputsUnion1TypeApplyPatchCallOutputItem:
// inputsUnion1.ApplyPatchCallOutputItem is populated
case components.InputsUnion1TypeInputsMessage:
// inputsUnion1.InputsMessage is populated
case components.InputsUnion1TypeInputsReasoning:
// inputsUnion1.InputsReasoning is populated
case components.InputsUnion1TypeOutputFunctionCallItem:
// inputsUnion1.OutputFunctionCallItem is populated
case components.InputsUnion1TypeOutputCustomToolCallItem:
// inputsUnion1.OutputCustomToolCallItem is populated
case components.InputsUnion1TypeOutputWebSearchCallItem:
// inputsUnion1.OutputWebSearchCallItem is populated
case components.InputsUnion1TypeOutputFileSearchCallItem:
// inputsUnion1.OutputFileSearchCallItem is populated
case components.InputsUnion1TypeOutputImageGenerationCallItem:
// inputsUnion1.OutputImageGenerationCallItem is populated
case components.InputsUnion1TypeOutputCodeInterpreterCallItem:
// inputsUnion1.OutputCodeInterpreterCallItem is populated
case components.InputsUnion1TypeOutputComputerCallItem:
// inputsUnion1.OutputComputerCallItem is populated
case components.InputsUnion1TypeOutputDatetimeItem:
// inputsUnion1.OutputDatetimeItem is populated
case components.InputsUnion1TypeOutputWebSearchServerToolItem:
// inputsUnion1.OutputWebSearchServerToolItem is populated
case components.InputsUnion1TypeOutputCodeInterpreterServerToolItem:
// inputsUnion1.OutputCodeInterpreterServerToolItem is populated
case components.InputsUnion1TypeOutputFileSearchServerToolItem:
// inputsUnion1.OutputFileSearchServerToolItem is populated
case components.InputsUnion1TypeOutputImageGenerationServerToolItem:
// inputsUnion1.OutputImageGenerationServerToolItem is populated
case components.InputsUnion1TypeOutputBrowserUseServerToolItem:
// inputsUnion1.OutputBrowserUseServerToolItem is populated
case components.InputsUnion1TypeOutputBashServerToolItem:
// inputsUnion1.OutputBashServerToolItem is populated
case components.InputsUnion1TypeOutputTextEditorServerToolItem:
// inputsUnion1.OutputTextEditorServerToolItem is populated
case components.InputsUnion1TypeOutputApplyPatchServerToolItem:
// inputsUnion1.OutputApplyPatchServerToolItem is populated
case components.InputsUnion1TypeOutputWebFetchServerToolItem:
// inputsUnion1.OutputWebFetchServerToolItem is populated
case components.InputsUnion1TypeOutputToolSearchServerToolItem:
// inputsUnion1.OutputToolSearchServerToolItem is populated
case components.InputsUnion1TypeOutputMemoryServerToolItem:
// inputsUnion1.OutputMemoryServerToolItem is populated
case components.InputsUnion1TypeOutputMcpServerToolItem:
// inputsUnion1.OutputMcpServerToolItem is populated
case components.InputsUnion1TypeOutputSearchModelsServerToolItem:
// inputsUnion1.OutputSearchModelsServerToolItem is populated
case components.InputsUnion1TypeLocalShellCallItem:
// inputsUnion1.LocalShellCallItem is populated
case components.InputsUnion1TypeLocalShellCallOutputItem:
// inputsUnion1.LocalShellCallOutputItem is populated
case components.InputsUnion1TypeShellCallItem:
// inputsUnion1.ShellCallItem is populated
case components.InputsUnion1TypeShellCallOutputItem:
// inputsUnion1.ShellCallOutputItem is populated
case components.InputsUnion1TypeMcpListToolsItem:
// inputsUnion1.McpListToolsItem is populated
case components.InputsUnion1TypeMcpApprovalRequestItem:
// inputsUnion1.McpApprovalRequestItem is populated
case components.InputsUnion1TypeMcpApprovalResponseItem:
// inputsUnion1.McpApprovalResponseItem is populated
case components.InputsUnion1TypeMcpCallItem:
// inputsUnion1.McpCallItem is populated
case components.InputsUnion1TypeCustomToolCallItem:
// inputsUnion1.CustomToolCallItem is populated
case components.InputsUnion1TypeCustomToolCallOutputItem:
// inputsUnion1.CustomToolCallOutputItem is populated
case components.InputsUnion1TypeCompactionItem:
// inputsUnion1.CompactionItem is populated
case components.InputsUnion1TypeItemReferenceItem:
// inputsUnion1.ItemReferenceItem is populated
}