EasyInputMessagePhaseUnion - Go SDK

EasyInputMessagePhaseUnion type definition

The Go SDK and docs are currently in beta. Report issues on GitHub.

The phase of an assistant message. Use commentary for an intermediate assistant message and final_answer for the final assistant message. For follow-up requests with models like gpt-5.3-codex and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.

Supported Types

EasyInputMessagePhaseCommentary

1easyInputMessagePhaseUnion := components.CreateEasyInputMessagePhaseUnionEasyInputMessagePhaseCommentary(components.EasyInputMessagePhaseCommentary{/* values here */})

EasyInputMessagePhaseFinalAnswer

1easyInputMessagePhaseUnion := components.CreateEasyInputMessagePhaseUnionEasyInputMessagePhaseFinalAnswer(components.EasyInputMessagePhaseFinalAnswer{/* values here */})

1easyInputMessagePhaseUnion := components.CreateEasyInputMessagePhaseUnionAny(any{/* values here */})

Union Discrimination

Use the Type field to determine which variant is active, then access the corresponding field:

1switch easyInputMessagePhaseUnion.Type {
2 case components.EasyInputMessagePhaseUnionTypeEasyInputMessagePhaseCommentary:
3 // easyInputMessagePhaseUnion.EasyInputMessagePhaseCommentary is populated
4 case components.EasyInputMessagePhaseUnionTypeEasyInputMessagePhaseFinalAnswer:
5 // easyInputMessagePhaseUnion.EasyInputMessagePhaseFinalAnswer is populated
6 case components.EasyInputMessagePhaseUnionTypeAny:
7 // easyInputMessagePhaseUnion.Any is populated
8}