Class ContentObject
java.lang.Object
co.elastic.clients.elasticsearch.inference.ContentObject
- All Implemented Interfaces:
JsonpSerializable
An object style representation of a single portion of a conversation.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<ContentObject>Json deserializer forContentObject -
Method Summary
Modifier and TypeMethodDescriptionfinal FileContentfile()Required - The file content.final ImageUrlimageUrl()Required - The image content.static ContentObjectrebuild()voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal Stringtext()Required - The text content.toString()final ContentTypetype()Required - The type of content.
-
Field Details
-
_DESERIALIZER
Json deserializer forContentObject
-
-
Method Details
-
of
-
type
Required - The type of content. Must be one oftext,image_urlorfile. Not all services/models support content types other than "text"API name:
type -
text
Required - The text content. Only applicable for thetexttypeAPI name:
text -
imageUrl
Required - The image content. Only applicable for theimage_urltypeAPI name:
image_url -
file
Required - The file content. Only applicable for thefiletypeAPI name:
file -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
rebuild
- Returns:
- New
ContentObject.Builderinitialized with field values of this instance
-
setupContentObjectDeserializer
-