Class MemoryRecordMetadata
- java.lang.Object
-
- com.microsoft.semantickernel.memory.MemoryRecordMetadata
-
public class MemoryRecordMetadata extends Object
Class representing the metadata associated with a Semantic Kernel memory.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetAdditionalMetadata()Custom metadata associated with a memory.StringgetDescription()Optional title describing the content.StringgetExternalSourceName()A value used to understand which external service owns the data, to avoid storing the information inside the URI.StringgetId()Unique identifier.StringgetText()Source text, available only when the memory is not an external source.inthashCode()booleanisReference()Whether the source data used to calculate embeddings are stored in the local storage provider or is available through and external service, such as web site, MS Graph, etc.StringtoString()
-
-
-
Constructor Detail
-
MemoryRecordMetadata
public MemoryRecordMetadata(boolean isReference, @Nonnull String id, @Nonnull String text, @Nonnull String description, @Nonnull String externalSourceName, @Nonnull String additionalMetadata)Constructor.- Parameters:
isReference- True if source data is local, false if source data comes from an external service.id- Unique string used to identify theMemoryRecord.text- Local source data associated with aMemoryRecordembedding.description-MemoryRecorddescription.externalSourceName- Name of the external source if isReference is true.additionalMetadata- Field for saving custom metadata with a memory.
-
-
Method Detail
-
isReference
public boolean isReference()
Whether the source data used to calculate embeddings are stored in the local storage provider or is available through and external service, such as web site, MS Graph, etc.
-
getExternalSourceName
public String getExternalSourceName()
A value used to understand which external service owns the data, to avoid storing the information inside the URI. E.g. this could be "MSTeams", "WebSite", "GitHub", etc.- Returns:
- Name of the external service if isReference is true.
-
getId
public String getId()
Unique identifier. The format of the value is domain specific, so it can be a URL, a GUID, etc.- Returns:
- Unique string used to identify the
MemoryRecord.
-
getDescription
public String getDescription()
Optional title describing the content. Note: the title is not indexed.- Returns:
- the optional title describing the content.
-
getText
public String getText()
Source text, available only when the memory is not an external source.- Returns:
- Source text when the memory is not an external source.
-
getAdditionalMetadata
public String getAdditionalMetadata()
Custom metadata associated with a memory.- Returns:
- Custom metadata associated with a memory.
-
-