Package com.sap.ai.sdk.grounding.model
Class RetrievalChunk
java.lang.Object
com.sap.ai.sdk.grounding.model.RetrievalChunk
RetrievalChunk
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMetadataItem(RetrievalKeyValueListPair metadataItem) Add one metadata instance to thisRetrievalChunk.Set the content of thisRetrievalChunkinstance and return the same instance.static RetrievalChunk.Buildercreate()Create a type-safe, fluent-api builder object to construct a newRetrievalChunkinstance with all required arguments.booleanGet contentgetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theRetrievalChunk.getId()Get idGet metadataGet postProcessingScoreGet searchScoresinthashCode()Set the id of thisRetrievalChunkinstance and return the same instance.metadata(List<RetrievalKeyValueListPair> metadata) Set the metadata of thisRetrievalChunkinstance and return the same instance.postProcessingScore(Score postProcessingScore) Set the postProcessingScore of thisRetrievalChunkinstance and return the same instance.searchScores(SearchScores searchScores) Set the searchScores of thisRetrievalChunkinstance and return the same instance.voidsetContent(String content) Set the content of thisRetrievalChunkinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisRetrievalChunkinstance.voidSet the id of thisRetrievalChunkinstance.voidsetMetadata(List<RetrievalKeyValueListPair> metadata) Set the metadata of thisRetrievalChunkinstance.voidsetPostProcessingScore(Score postProcessingScore) Set the postProcessingScore of thisRetrievalChunkinstance.voidsetSearchScores(SearchScores searchScores) Set the searchScores of thisRetrievalChunkinstance.toMap()Get the value of all properties of thisRetrievalChunkinstance including unrecognized properties.toString()
-
Constructor Details
-
RetrievalChunk
protected RetrievalChunk()Default constructor for RetrievalChunk.
-
-
Method Details
-
id
Set the id of thisRetrievalChunkinstance and return the same instance.- Parameters:
id- The id of thisRetrievalChunk- Returns:
- The same instance of this
RetrievalChunkclass
-
getId
Get id- Returns:
- id The id of this
RetrievalChunkinstance.
-
setId
Set the id of thisRetrievalChunkinstance.- Parameters:
id- The id of thisRetrievalChunk
-
content
Set the content of thisRetrievalChunkinstance and return the same instance.- Parameters:
content- The content of thisRetrievalChunk- Returns:
- The same instance of this
RetrievalChunkclass
-
getContent
Get content- Returns:
- content The content of this
RetrievalChunkinstance.
-
setContent
Set the content of thisRetrievalChunkinstance.- Parameters:
content- The content of thisRetrievalChunk
-
metadata
Set the metadata of thisRetrievalChunkinstance and return the same instance.- Parameters:
metadata- The metadata of thisRetrievalChunk- Returns:
- The same instance of this
RetrievalChunkclass
-
addMetadataItem
Add one metadata instance to thisRetrievalChunk.- Parameters:
metadataItem- The metadata that should be added- Returns:
- The same instance of type
RetrievalChunk
-
getMetadata
Get metadata- Returns:
- metadata The metadata of this
RetrievalChunkinstance.
-
setMetadata
Set the metadata of thisRetrievalChunkinstance.- Parameters:
metadata- The metadata of thisRetrievalChunk
-
searchScores
Set the searchScores of thisRetrievalChunkinstance and return the same instance.- Parameters:
searchScores- The searchScores of thisRetrievalChunk- Returns:
- The same instance of this
RetrievalChunkclass
-
getSearchScores
Get searchScores- Returns:
- searchScores The searchScores of this
RetrievalChunkinstance.
-
setSearchScores
Set the searchScores of thisRetrievalChunkinstance.- Parameters:
searchScores- The searchScores of thisRetrievalChunk
-
postProcessingScore
Set the postProcessingScore of thisRetrievalChunkinstance and return the same instance.- Parameters:
postProcessingScore- The postProcessingScore of thisRetrievalChunk- Returns:
- The same instance of this
RetrievalChunkclass
-
getPostProcessingScore
Get postProcessingScore- Returns:
- postProcessingScore The postProcessingScore of this
RetrievalChunkinstance.
-
setPostProcessingScore
Set the postProcessingScore of thisRetrievalChunkinstance.- Parameters:
postProcessingScore- The postProcessingScore of thisRetrievalChunk
-
getCustomFieldNames
Get the names of the unrecognizable properties of theRetrievalChunk.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisRetrievalChunkinstance.- Parameters:
name- The name of the property- Returns:
- The value of the property
- Throws:
NoSuchElementException- If no property with the given name could be found.
-
toMap
Get the value of all properties of thisRetrievalChunkinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisRetrievalChunkinstance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
customFieldName- The name of the propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
create
Create a type-safe, fluent-api builder object to construct a newRetrievalChunkinstance with all required arguments.
-
toMap()instead.