SendChatCompletionRequestResponse - Go SDK

SendChatCompletionRequestResponse type definition

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

Supported Types

ChatResult

1sendChatCompletionRequestResponse := operations.CreateSendChatCompletionRequestResponseChatResult(components.ChatResult{/* values here */})

1sendChatCompletionRequestResponse := operations.CreateSendChatCompletionRequestResponseEventStream(*stream.EventStream[operations.SendChatCompletionRequestResponseBody]{/* values here */})

Union Discrimination

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

1switch sendChatCompletionRequestResponse.Type {
2 case operations.SendChatCompletionRequestResponseTypeChatResult:
3 // sendChatCompletionRequestResponse.ChatResult is populated
4 case operations.SendChatCompletionRequestResponseTypeEventStream:
5 // sendChatCompletionRequestResponse.EventStream is populated
6}