Class EmbeddingContentObjectItem
java.lang.Object
co.elastic.clients.elasticsearch.inference.EmbeddingContentObjectItem
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class EmbeddingContentObjectItem
extends Object
implements JsonpSerializable
An object containing the input data for a single item for the model to embed.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<EmbeddingContentObjectItem>Json deserializer forEmbeddingContentObjectItem -
Method Summary
Modifier and TypeMethodDescriptionfinal EmbeddingContentFormatformat()The format of the input.static EmbeddingContentObjectItemrebuild()voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidsetupEmbeddingContentObjectItemDeserializer(ObjectDeserializer<EmbeddingContentObjectItem.Builder> op) toString()final EmbeddingContentTypetype()Required - The type of input to embed.final Stringvalue()Required - The value of the input to embed.
-
Field Details
-
_DESERIALIZER
Json deserializer forEmbeddingContentObjectItem
-
-
Method Details
-
of
public static EmbeddingContentObjectItem of(Function<EmbeddingContentObjectItem.Builder, ObjectBuilder<EmbeddingContentObjectItem>> fn) -
type
Required - The type of input to embed. Not all models support all input types. Theaudio,video, andpdftypes are available in Elasticsearch 9.5.0 and later.API name:
type -
format
The format of the input. For thetexttype this must betext. For all other types, this must bebase64. If not specified, this will default totextfor thetexttype andbase64for all other types.API name:
format -
value
Required - The value of the input to embed. For images, this must be a base64-encoded data URI, i.e. "data:content/type;base64,..."API name:
value -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
rebuild
- Returns:
- New
EmbeddingContentObjectItem.Builderinitialized with field values of this instance
-
setupEmbeddingContentObjectItemDeserializer
protected static void setupEmbeddingContentObjectItemDeserializer(ObjectDeserializer<EmbeddingContentObjectItem.Builder> op)
-