Module org.elasticsearch.xcore
Record Class LegacyTextEmbeddingResults
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.core.inference.results.LegacyTextEmbeddingResults
- All Implemented Interfaces:
NamedWriteable,Writeable,InferenceResults,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentFragment
@Deprecated
public record LegacyTextEmbeddingResults(List<LegacyTextEmbeddingResults.Embedding> embeddings)
extends Record
implements InferenceResults
Deprecated.
Writes a text embedding result in the following json format
{
"text_embedding": [
{
"embedding": [
0.1
]
},
{
"embedding": [
0.2
]
}
]
}
Legacy text embedding results represents what was returned prior to the
TransportVersions.V_8_12_0 version.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordDeprecated.Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.inference.InferenceResults
MODEL_ID_RESULTS_FIELDFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Creates an instance of aLegacyTextEmbeddingResultsrecord class.Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionasMap()Deprecated.Deprecated.Deprecated.Returns the value of theembeddingsrecord component.booleanDeprecated.Indicates whether some other object is "equal to" this one.Deprecated.Deprecated.inthashCode()Deprecated.Returns a hash code value for this object.Deprecated.final StringtoString()Deprecated.Returns a string representation of this record class.org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) Deprecated.Deprecated.voidwriteTo(StreamOutput out) Deprecated.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
NAME
Deprecated.- See Also:
-
TEXT_EMBEDDING
Deprecated.
-
-
Constructor Details
-
LegacyTextEmbeddingResults
Deprecated.- Throws:
IOException
-
LegacyTextEmbeddingResults
Deprecated.Creates an instance of aLegacyTextEmbeddingResultsrecord class.- Parameters:
embeddings- the value for theembeddingsrecord component
-
-
Method Details
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException Deprecated.- Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
writeTo
Deprecated.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
getWriteableName
Deprecated.- Specified by:
getWriteableNamein interfaceNamedWriteable
-
getResultsField
Deprecated.- Specified by:
getResultsFieldin interfaceInferenceResults
-
asMap
Deprecated.- Specified by:
asMapin interfaceInferenceResults
-
asMap
Deprecated.- Specified by:
asMapin interfaceInferenceResults
-
predictedValue
Deprecated.- Specified by:
predictedValuein interfaceInferenceResults
-
equals
Deprecated.Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
hashCode
public int hashCode()Deprecated.Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
transformToTextEmbeddingResults
Deprecated. -
toString
Deprecated.Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
embeddings
Deprecated.Returns the value of theembeddingsrecord component.- Returns:
- the value of the
embeddingsrecord component
-
InferenceTextEmbeddingFloatResultsinstead