Package com.axelor.ai.knowledge
Record Class KnowledgeRetriever.RetrievedChunk
java.lang.Object
java.lang.Record
com.axelor.ai.knowledge.KnowledgeRetriever.RetrievedChunk
- Enclosing class:
KnowledgeRetriever
public static record KnowledgeRetriever.RetrievedChunk(String text, double score, String sourceType, String fileName, String modelName, String recordId)
extends Record
A retrieved text chunk with metadata.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fileName()Returns the value of thefileNamerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themodelNamerecord component.recordId()Returns the value of therecordIdrecord component.doublescore()Returns the value of thescorerecord component.Returns the value of thesourceTyperecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RetrievedChunk
public RetrievedChunk(String text, double score, String sourceType, String fileName, String modelName, String recordId) Creates an instance of aRetrievedChunkrecord class.- Parameters:
text- the value for thetextrecord componentscore- the value for thescorerecord componentsourceType- the value for thesourceTyperecord componentfileName- the value for thefileNamerecord componentmodelName- the value for themodelNamerecord componentrecordId- the value for therecordIdrecord component
-
-
Method Details
-
formatSource
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
score
public double score()Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-
sourceType
Returns the value of thesourceTyperecord component.- Returns:
- the value of the
sourceTyperecord component
-
fileName
Returns the value of thefileNamerecord component.- Returns:
- the value of the
fileNamerecord component
-
modelName
Returns the value of themodelNamerecord component.- Returns:
- the value of the
modelNamerecord component
-
recordId
Returns the value of therecordIdrecord component.- Returns:
- the value of the
recordIdrecord component
-