Package com.openai.models
Class MessageContent
-
- All Implemented Interfaces:
public final class MessageContent
References an image File in the content of a message.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
MessageContent.Visitor
public final class
MessageContent.Deserializer
public final class
MessageContent.Serializer
-
Method Summary
Modifier and Type Method Description final Optional<ImageFileContentBlock>
imageFileContentBlock()
References an image File in the content of a message. final Optional<ImageUrlContentBlock>
imageUrlContentBlock()
References an image URL in the content of a message. final Optional<TextContentBlock>
textContentBlock()
The text content that is part of a message. final Optional<RefusalContentBlock>
refusalContentBlock()
The refusal content generated by the assistant. final Boolean
isImageFileContentBlock()
final Boolean
isImageUrlContentBlock()
final Boolean
isTextContentBlock()
final Boolean
isRefusalContentBlock()
final ImageFileContentBlock
asImageFileContentBlock()
References an image File in the content of a message. final ImageUrlContentBlock
asImageUrlContentBlock()
References an image URL in the content of a message. final TextContentBlock
asTextContentBlock()
The text content that is part of a message. final RefusalContentBlock
asRefusalContentBlock()
The refusal content generated by the assistant. final Optional<JsonValue>
_json()
final <T extends Any> T
accept(MessageContent.Visitor<T> visitor)
final MessageContent
validate()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static MessageContent
ofImageFileContentBlock(ImageFileContentBlock imageFileContentBlock)
References an image File in the content of a message. final static MessageContent
ofImageUrlContentBlock(ImageUrlContentBlock imageUrlContentBlock)
References an image URL in the content of a message. final static MessageContent
ofTextContentBlock(TextContentBlock textContentBlock)
The text content that is part of a message. final static MessageContent
ofRefusalContentBlock(RefusalContentBlock refusalContentBlock)
The refusal content generated by the assistant. -
-
Method Detail
-
imageFileContentBlock
final Optional<ImageFileContentBlock> imageFileContentBlock()
References an image File in the content of a message.
-
imageUrlContentBlock
final Optional<ImageUrlContentBlock> imageUrlContentBlock()
References an image URL in the content of a message.
-
textContentBlock
final Optional<TextContentBlock> textContentBlock()
The text content that is part of a message.
-
refusalContentBlock
final Optional<RefusalContentBlock> refusalContentBlock()
The refusal content generated by the assistant.
-
isImageFileContentBlock
final Boolean isImageFileContentBlock()
-
isImageUrlContentBlock
final Boolean isImageUrlContentBlock()
-
isTextContentBlock
final Boolean isTextContentBlock()
-
isRefusalContentBlock
final Boolean isRefusalContentBlock()
-
asImageFileContentBlock
final ImageFileContentBlock asImageFileContentBlock()
References an image File in the content of a message.
-
asImageUrlContentBlock
final ImageUrlContentBlock asImageUrlContentBlock()
References an image URL in the content of a message.
-
asTextContentBlock
final TextContentBlock asTextContentBlock()
The text content that is part of a message.
-
asRefusalContentBlock
final RefusalContentBlock asRefusalContentBlock()
The refusal content generated by the assistant.
-
accept
final <T extends Any> T accept(MessageContent.Visitor<T> visitor)
-
validate
final MessageContent validate()
-
ofImageFileContentBlock
final static MessageContent ofImageFileContentBlock(ImageFileContentBlock imageFileContentBlock)
References an image File in the content of a message.
-
ofImageUrlContentBlock
final static MessageContent ofImageUrlContentBlock(ImageUrlContentBlock imageUrlContentBlock)
References an image URL in the content of a message.
-
ofTextContentBlock
final static MessageContent ofTextContentBlock(TextContentBlock textContentBlock)
The text content that is part of a message.
-
ofRefusalContentBlock
final static MessageContent ofRefusalContentBlock(RefusalContentBlock refusalContentBlock)
The refusal content generated by the assistant.
-
-
-
-