Package com.openai.models
Class ChatCompletionToolMessageParam.Content
-
- All Implemented Interfaces:
public final class ChatCompletionToolMessageParam.Content
The contents of the tool message.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
ChatCompletionToolMessageParam.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 contents of the tool message. final Optional<List<ChatCompletionContentPartText>>
arrayOfContentParts()
An array of content parts with a defined type. final Boolean
isText()
final Boolean
isArrayOfContentParts()
final String
asText()
The contents of the tool message. final List<ChatCompletionContentPartText>
asArrayOfContentParts()
An array of content parts with a defined type. final Optional<JsonValue>
_json()
final <T extends Any> T
accept(ChatCompletionToolMessageParam.Content.Visitor<T> visitor)
final ChatCompletionToolMessageParam.Content
validate()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ChatCompletionToolMessageParam.Content
ofText(String text)
The contents of the tool message. final static ChatCompletionToolMessageParam.Content
ofArrayOfContentParts(List<ChatCompletionContentPartText> arrayOfContentParts)
An array of content parts with a defined type. -
-
Method Detail
-
arrayOfContentParts
final Optional<List<ChatCompletionContentPartText>> arrayOfContentParts()
An array of content parts with a defined type. For tool messages, only type
text
is supported.
-
isArrayOfContentParts
final Boolean isArrayOfContentParts()
-
asArrayOfContentParts
final List<ChatCompletionContentPartText> asArrayOfContentParts()
An array of content parts with a defined type. For tool messages, only type
text
is supported.
-
accept
final <T extends Any> T accept(ChatCompletionToolMessageParam.Content.Visitor<T> visitor)
-
validate
final ChatCompletionToolMessageParam.Content validate()
-
ofText
final static ChatCompletionToolMessageParam.Content ofText(String text)
The contents of the tool message.
-
ofArrayOfContentParts
final static ChatCompletionToolMessageParam.Content ofArrayOfContentParts(List<ChatCompletionContentPartText> arrayOfContentParts)
An array of content parts with a defined type. For tool messages, only type
text
is supported.
-
-
-
-