Package com.openai.models.beta.threads
Class ThreadCreateAndRunParams.Thread.Message.Content
-
- All Implemented Interfaces:
public final class ThreadCreateAndRunParams.Thread.Message.Content
The text contents of the message.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
ThreadCreateAndRunParams.Thread.Message.Content.Visitor
An interface that defines how to map each variant of Content to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<String>
text()
The text contents of the message. final Optional<List<MessageContentPartParam>>
arrayOfContentParts()
An array of content parts with a defined type, each can be of type text
or images can be passed withimage_url
orimage_file
.final Boolean
isText()
final Boolean
isArrayOfContentParts()
final String
asText()
The text contents of the message. final List<MessageContentPartParam>
asArrayOfContentParts()
An array of content parts with a defined type, each can be of type text
or images can be passed withimage_url
orimage_file
.final Optional<JsonValue>
_json()
final <T extends Any> T
accept(ThreadCreateAndRunParams.Thread.Message.Content.Visitor<T> visitor)
final ThreadCreateAndRunParams.Thread.Message.Content
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ThreadCreateAndRunParams.Thread.Message.Content
ofText(String text)
The text contents of the message. final static ThreadCreateAndRunParams.Thread.Message.Content
ofArrayOfContentParts(List<MessageContentPartParam> arrayOfContentParts)
An array of content parts with a defined type, each can be of type text
or images can be passed withimage_url
orimage_file
.-
-
Method Detail
-
arrayOfContentParts
final Optional<List<MessageContentPartParam>> arrayOfContentParts()
An array of content parts with a defined type, each can be of type
text
or images can be passed withimage_url
orimage_file
. Image types are only supported on Vision-compatible models.
-
isArrayOfContentParts
final Boolean isArrayOfContentParts()
-
asArrayOfContentParts
final List<MessageContentPartParam> asArrayOfContentParts()
An array of content parts with a defined type, each can be of type
text
or images can be passed withimage_url
orimage_file
. Image types are only supported on Vision-compatible models.
-
accept
final <T extends Any> T accept(ThreadCreateAndRunParams.Thread.Message.Content.Visitor<T> visitor)
-
validate
final ThreadCreateAndRunParams.Thread.Message.Content validate()
-
ofText
final static ThreadCreateAndRunParams.Thread.Message.Content ofText(String text)
The text contents of the message.
-
ofArrayOfContentParts
final static ThreadCreateAndRunParams.Thread.Message.Content ofArrayOfContentParts(List<MessageContentPartParam> arrayOfContentParts)
An array of content parts with a defined type, each can be of type
text
or images can be passed withimage_url
orimage_file
. Image types are only supported on Vision-compatible models.
-
-
-
-