Class Message.Content
-
- All Implemented Interfaces:
public final class Message.ContentA text input to the model.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceMessage.Content.VisitorAn interface that defines how to map each variant of Content to a value of type T.
public final classMessage.Content.ReasoningTextReasoning text from the model.
-
Method Summary
Modifier and Type Method Description final Optional<ResponseInputText>inputText()A text input to the model. final Optional<ResponseOutputText>outputText()A text output from the model. final Optional<TextContent>text()A text content. final Optional<SummaryTextContent>summaryText()A summary text from the model. final Optional<Message.Content.ReasoningText>reasoningText()Reasoning text from the model. final Optional<ResponseOutputRefusal>refusal()A refusal from the model. final Optional<ResponseInputImage>inputImage()An image input to the model. final Optional<ComputerScreenshotContent>computerScreenshot()A screenshot of a computer. final Optional<ResponseInputFile>inputFile()A file input to the model. final BooleanisInputText()final BooleanisOutputText()final BooleanisText()final BooleanisSummaryText()final BooleanisReasoningText()final BooleanisRefusal()final BooleanisInputImage()final BooleanisComputerScreenshot()final BooleanisInputFile()final ResponseInputTextasInputText()A text input to the model. final ResponseOutputTextasOutputText()A text output from the model. final TextContentasText()A text content. final SummaryTextContentasSummaryText()A summary text from the model. final Message.Content.ReasoningTextasReasoningText()Reasoning text from the model. final ResponseOutputRefusalasRefusal()A refusal from the model. final ResponseInputImageasInputImage()An image input to the model. final ComputerScreenshotContentasComputerScreenshot()A screenshot of a computer. final ResponseInputFileasInputFile()A file input to the model. final Optional<JsonValue>_json()final <T extends Any> Taccept(Message.Content.Visitor<T> visitor)final Message.Contentvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Message.ContentofInputText(ResponseInputText inputText)A text input to the model. final static Message.ContentofOutputText(ResponseOutputText outputText)A text output from the model. final static Message.ContentofText(TextContent text)A text content. final static Message.ContentofSummaryText(SummaryTextContent summaryText)A summary text from the model. final static Message.ContentofReasoningText(Message.Content.ReasoningText reasoningText)Reasoning text from the model. final static Message.ContentofRefusal(ResponseOutputRefusal refusal)A refusal from the model. final static Message.ContentofInputImage(ResponseInputImage inputImage)An image input to the model. final static Message.ContentofComputerScreenshot(ComputerScreenshotContent computerScreenshot)A screenshot of a computer. final static Message.ContentofInputFile(ResponseInputFile inputFile)A file input to the model. -
-
Method Detail
-
inputText
final Optional<ResponseInputText> inputText()
A text input to the model.
-
outputText
final Optional<ResponseOutputText> outputText()
A text output from the model.
-
text
final Optional<TextContent> text()
A text content.
-
summaryText
final Optional<SummaryTextContent> summaryText()
A summary text from the model.
-
reasoningText
final Optional<Message.Content.ReasoningText> reasoningText()
Reasoning text from the model.
-
refusal
final Optional<ResponseOutputRefusal> refusal()
A refusal from the model.
-
inputImage
final Optional<ResponseInputImage> inputImage()
An image input to the model. Learn about image inputs.
-
computerScreenshot
final Optional<ComputerScreenshotContent> computerScreenshot()
A screenshot of a computer.
-
inputFile
final Optional<ResponseInputFile> inputFile()
A file input to the model.
-
isInputText
final Boolean isInputText()
-
isOutputText
final Boolean isOutputText()
-
isSummaryText
final Boolean isSummaryText()
-
isReasoningText
final Boolean isReasoningText()
-
isInputImage
final Boolean isInputImage()
-
isComputerScreenshot
final Boolean isComputerScreenshot()
-
isInputFile
final Boolean isInputFile()
-
asInputText
final ResponseInputText asInputText()
A text input to the model.
-
asOutputText
final ResponseOutputText asOutputText()
A text output from the model.
-
asText
final TextContent asText()
A text content.
-
asSummaryText
final SummaryTextContent asSummaryText()
A summary text from the model.
-
asReasoningText
final Message.Content.ReasoningText asReasoningText()
Reasoning text from the model.
-
asRefusal
final ResponseOutputRefusal asRefusal()
A refusal from the model.
-
asInputImage
final ResponseInputImage asInputImage()
An image input to the model. Learn about image inputs.
-
asComputerScreenshot
final ComputerScreenshotContent asComputerScreenshot()
A screenshot of a computer.
-
asInputFile
final ResponseInputFile asInputFile()
A file input to the model.
-
accept
final <T extends Any> T accept(Message.Content.Visitor<T> visitor)
-
validate
final Message.Content validate()
-
ofInputText
final static Message.Content ofInputText(ResponseInputText inputText)
A text input to the model.
-
ofOutputText
final static Message.Content ofOutputText(ResponseOutputText outputText)
A text output from the model.
-
ofText
final static Message.Content ofText(TextContent text)
A text content.
-
ofSummaryText
final static Message.Content ofSummaryText(SummaryTextContent summaryText)
A summary text from the model.
-
ofReasoningText
final static Message.Content ofReasoningText(Message.Content.ReasoningText reasoningText)
Reasoning text from the model.
-
ofRefusal
final static Message.Content ofRefusal(ResponseOutputRefusal refusal)
A refusal from the model.
-
ofInputImage
final static Message.Content ofInputImage(ResponseInputImage inputImage)
An image input to the model. Learn about image inputs.
-
ofComputerScreenshot
final static Message.Content ofComputerScreenshot(ComputerScreenshotContent computerScreenshot)
A screenshot of a computer.
-
ofInputFile
final static Message.Content ofInputFile(ResponseInputFile inputFile)
A file input to the model.
-
-
-
-