Class Message.Content
-
- All Implemented Interfaces:
public final class Message.Content
A text input to the model.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
Message.Content.Visitor
An interface that defines how to map each variant of Content to a value of type T.
public final class
Message.Content.ReasoningText
Reasoning 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 Boolean
isInputText()
final Boolean
isOutputText()
final Boolean
isText()
final Boolean
isSummaryText()
final Boolean
isReasoningText()
final Boolean
isRefusal()
final Boolean
isInputImage()
final Boolean
isComputerScreenshot()
final Boolean
isInputFile()
final ResponseInputText
asInputText()
A text input to the model. final ResponseOutputText
asOutputText()
A text output from the model. final TextContent
asText()
A text content. final SummaryTextContent
asSummaryText()
A summary text from the model. final Message.Content.ReasoningText
asReasoningText()
Reasoning text from the model. final ResponseOutputRefusal
asRefusal()
A refusal from the model. final ResponseInputImage
asInputImage()
An image input to the model. final ComputerScreenshotContent
asComputerScreenshot()
A screenshot of a computer. final ResponseInputFile
asInputFile()
A file input to the model. final Optional<JsonValue>
_json()
final <T extends Any> T
accept(Message.Content.Visitor<T> visitor)
final Message.Content
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static Message.Content
ofInputText(ResponseInputText inputText)
A text input to the model. final static Message.Content
ofOutputText(ResponseOutputText outputText)
A text output from the model. final static Message.Content
ofText(TextContent text)
A text content. final static Message.Content
ofSummaryText(SummaryTextContent summaryText)
A summary text from the model. final static Message.Content
ofReasoningText(Message.Content.ReasoningText reasoningText)
Reasoning text from the model. final static Message.Content
ofRefusal(ResponseOutputRefusal refusal)
A refusal from the model. final static Message.Content
ofInputImage(ResponseInputImage inputImage)
An image input to the model. final static Message.Content
ofComputerScreenshot(ComputerScreenshotContent computerScreenshot)
A screenshot of a computer. final static Message.Content
ofInputFile(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.
-
-
-
-