Package com.sap.ai.sdk.grounding.model
Class VectorChunk
java.lang.Object
com.sap.ai.sdk.grounding.model.VectorChunk
VectorChunk
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMetadataItem(VectorKeyValueListPair metadataItem) Add one metadata instance to thisVectorChunk.Set the content of thisVectorChunkinstance and return the same instance.static VectorChunk.Buildercreate()Create a type-safe, fluent-api builder object to construct a newVectorChunkinstance with all required arguments.booleanGet contentgetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theVectorChunk.getId()Get idGet metadatainthashCode()Set the id of thisVectorChunkinstance and return the same instance.metadata(List<VectorKeyValueListPair> metadata) Set the metadata of thisVectorChunkinstance and return the same instance.voidsetContent(String content) Set the content of thisVectorChunkinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisVectorChunkinstance.voidSet the id of thisVectorChunkinstance.voidsetMetadata(List<VectorKeyValueListPair> metadata) Set the metadata of thisVectorChunkinstance.toMap()Get the value of all properties of thisVectorChunkinstance including unrecognized properties.toString()
-
Constructor Details
-
VectorChunk
protected VectorChunk()Default constructor for VectorChunk.
-
-
Method Details
-
id
Set the id of thisVectorChunkinstance and return the same instance.- Parameters:
id- The id of thisVectorChunk- Returns:
- The same instance of this
VectorChunkclass
-
getId
Get id- Returns:
- id The id of this
VectorChunkinstance.
-
setId
Set the id of thisVectorChunkinstance.- Parameters:
id- The id of thisVectorChunk
-
content
Set the content of thisVectorChunkinstance and return the same instance.- Parameters:
content- The content of thisVectorChunk- Returns:
- The same instance of this
VectorChunkclass
-
getContent
Get content- Returns:
- content The content of this
VectorChunkinstance.
-
setContent
Set the content of thisVectorChunkinstance.- Parameters:
content- The content of thisVectorChunk
-
metadata
Set the metadata of thisVectorChunkinstance and return the same instance.- Parameters:
metadata- The metadata of thisVectorChunk- Returns:
- The same instance of this
VectorChunkclass
-
addMetadataItem
Add one metadata instance to thisVectorChunk.- Parameters:
metadataItem- The metadata that should be added- Returns:
- The same instance of type
VectorChunk
-
getMetadata
Get metadata- Returns:
- metadata The metadata of this
VectorChunkinstance.
-
setMetadata
Set the metadata of thisVectorChunkinstance.- Parameters:
metadata- The metadata of thisVectorChunk
-
getCustomFieldNames
Get the names of the unrecognizable properties of theVectorChunk.- 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 thisVectorChunkinstance.- 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 thisVectorChunkinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisVectorChunkinstance. 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 newVectorChunkinstance with all required arguments.
-
toMap()instead.