Record Class LangChainInfinispanItem
java.lang.Object
java.lang.Record
dev.langchain4j.store.embedding.infinispan.LangChainInfinispanItem
- Record Components:
id
- , the id of the itemembedding
- , the vectortext
- , associated textmetadata
- , additional set of metadata
public record LangChainInfinispanItem(String id, float[] embedding, String text, Set<LangChainMetadata> metadata)
extends Record
Langchain item that is serialized for the langchain integration use case
-
Constructor Summary
ConstructorDescriptionLangChainInfinispanItem
(String id, float[] embedding, String text, Set<LangChainMetadata> metadata) Creates an instance of aLangChainInfinispanItem
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat[]
Returns the value of theembedding
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.metadata()
Returns the value of themetadata
record component.text()
Returns the value of thetext
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
LangChainInfinispanItem
public LangChainInfinispanItem(String id, float[] embedding, String text, Set<LangChainMetadata> metadata) Creates an instance of aLangChainInfinispanItem
record class.
-
-
Method Details
-
toString
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. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
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)
. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
embedding
public float[] embedding()Returns the value of theembedding
record component.- Returns:
- the value of the
embedding
record component
-
text
Returns the value of thetext
record component.- Returns:
- the value of the
text
record component
-
metadata
Returns the value of themetadata
record component.- Returns:
- the value of the
metadata
record component
-