Package com.openai.models
Class ChatCompletionUserMessageParam.Content
-
- All Implemented Interfaces:
public final class ChatCompletionUserMessageParam.Content
The contents of the user message.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
ChatCompletionUserMessageParam.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<ChatCompletionContentPart>>
arrayOfContentParts()
An array of content parts with a defined type. final Boolean
isText()
final Boolean
isArrayOfContentParts()
final String
asText()
The text contents of the message. final List<ChatCompletionContentPart>
asArrayOfContentParts()
An array of content parts with a defined type. final Optional<JsonValue>
_json()
final <T extends Any> T
accept(ChatCompletionUserMessageParam.Content.Visitor<T> visitor)
final ChatCompletionUserMessageParam.Content
validate()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ChatCompletionUserMessageParam.Content
ofText(String text)
The text contents of the message. final static ChatCompletionUserMessageParam.Content
ofArrayOfContentParts(List<ChatCompletionContentPart> arrayOfContentParts)
An array of content parts with a defined type. -
-
Method Detail
-
arrayOfContentParts
final Optional<List<ChatCompletionContentPart>> arrayOfContentParts()
An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text, image, or audio inputs.
-
isArrayOfContentParts
final Boolean isArrayOfContentParts()
-
asArrayOfContentParts
final List<ChatCompletionContentPart> asArrayOfContentParts()
An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text, image, or audio inputs.
-
accept
final <T extends Any> T accept(ChatCompletionUserMessageParam.Content.Visitor<T> visitor)
-
validate
final ChatCompletionUserMessageParam.Content validate()
-
ofText
final static ChatCompletionUserMessageParam.Content ofText(String text)
The text contents of the message.
-
ofArrayOfContentParts
final static ChatCompletionUserMessageParam.Content ofArrayOfContentParts(List<ChatCompletionContentPart> arrayOfContentParts)
An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text, image, or audio inputs.
-
-
-
-