Package com.openai.models.responses
Interface ResponseContent.Visitor
-
- All Implemented Interfaces:
public interface ResponseContent.Visitor<T extends Object>An interface that defines how to map each variant of ResponseContent to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitInputText(ResponseInputText inputText)A text input to the model. abstract TvisitInputImage(ResponseInputImage inputImage)An image input to the model. abstract TvisitInputFile(ResponseInputFile inputFile)A file input to the model. abstract TvisitInputAudio(ResponseInputAudio inputAudio)An audio input to the model. abstract TvisitOutputText(ResponseOutputText outputText)A text output from the model. abstract TvisitOutputRefusal(ResponseOutputRefusal outputRefusal)A refusal from the model. abstract TvisitReasoningText(ResponseContent.ReasoningTextContent reasoningText)Reasoning text from the model. Tunknown(JsonValue json)Maps an unknown variant of ResponseContent to a value of type T. -
-
Method Detail
-
visitInputText
abstract T visitInputText(ResponseInputText inputText)
A text input to the model.
-
visitInputImage
abstract T visitInputImage(ResponseInputImage inputImage)
An image input to the model. Learn about image inputs.
-
visitInputFile
abstract T visitInputFile(ResponseInputFile inputFile)
A file input to the model.
-
visitInputAudio
abstract T visitInputAudio(ResponseInputAudio inputAudio)
An audio input to the model.
-
visitOutputText
abstract T visitOutputText(ResponseOutputText outputText)
A text output from the model.
-
visitOutputRefusal
abstract T visitOutputRefusal(ResponseOutputRefusal outputRefusal)
A refusal from the model.
-
visitReasoningText
abstract T visitReasoningText(ResponseContent.ReasoningTextContent reasoningText)
Reasoning text from the model.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of ResponseContent to a value of type T.
An instance of ResponseContent can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-