Class EmbeddingInferenceResult
java.lang.Object
co.elastic.clients.elasticsearch.inference.EmbeddingInferenceResult
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<EmbeddingInferenceResult.Kind,Object>
@JsonpDeserializable
public class EmbeddingInferenceResult
extends Object
implements TaggedUnion<EmbeddingInferenceResult.Kind,Object>, JsonpSerializable
EmbeddingInferenceResult is an aggregation of mutually exclusive embeddings
variants
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumEmbeddingInferenceResultvariant kinds. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Object_get()_kind()Get the of the kind of variant held by this object.Get theembeddingsvariant value.Get theembeddings_bitsvariant value.Get theembeddings_bytesvariant value.booleanIs this variant instance of kindembeddings?booleanIs this variant instance of kindembeddings_bits?booleanIs this variant instance of kindembeddings_bytes?static EmbeddingInferenceResultvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidtoString()
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
EmbeddingInferenceResult
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<EmbeddingInferenceResult.Kind,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<EmbeddingInferenceResult.Kind,Object>
-
of
public static EmbeddingInferenceResult of(Function<EmbeddingInferenceResult.Builder, ObjectBuilder<EmbeddingInferenceResult>> fn) -
isEmbeddingsBytes
public boolean isEmbeddingsBytes()Is this variant instance of kindembeddings_bytes? -
embeddingsBytes
Get theembeddings_bytesvariant value.- Throws:
IllegalStateException- if the current variant is not of theembeddings_byteskind.
-
isEmbeddingsBits
public boolean isEmbeddingsBits()Is this variant instance of kindembeddings_bits? -
embeddingsBits
Get theembeddings_bitsvariant value.- Throws:
IllegalStateException- if the current variant is not of theembeddings_bitskind.
-
isEmbeddings
public boolean isEmbeddings()Is this variant instance of kindembeddings? -
embeddings
Get theembeddingsvariant value.- Throws:
IllegalStateException- if the current variant is not of theembeddingskind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
-
setupEmbeddingInferenceResultDeserializer
protected static void setupEmbeddingInferenceResultDeserializer(ObjectDeserializer<EmbeddingInferenceResult.Builder> op)
-