Class RerankInput
java.lang.Object
co.elastic.clients.elasticsearch.inference.rerank.RerankInput
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<RerankInput.Kind,Object>
@JsonpDeserializable
public class RerankInput
extends Object
implements TaggedUnion<RerankInput.Kind,Object>, JsonpSerializable
The documents to rank for the
rerank task. Either a string, an
array of strings, an object, or an array of objects. The object form
additionally allows specifying non-text inputs, such as images. info Only the
elasticservice currently supports non-text inputs for thereranktask.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfinal Object_get()final RerankInput.Kind_kind()Get the of the kind of variant held by this object.booleanisObject()Is this variant instance of kindobject?booleanisString()Is this variant instance of kindstring?object()Get theobjectvariant value.static RerankInputvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) string()Get thestringvariant value.toString()
-
Field Details
-
_DESERIALIZER
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<RerankInput.Kind,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<RerankInput.Kind,Object>
-
of
-
isObject
public boolean isObject()Is this variant instance of kindobject? -
object
Get theobjectvariant value.- Throws:
IllegalStateException- if the current variant is not of theobjectkind.
-
isString
public boolean isString()Is this variant instance of kindstring? -
string
Get thestringvariant value.- Throws:
IllegalStateException- if the current variant is not of thestringkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
-