types
Type objects for cognitive service
Attributes
Classes
AddMemoryRequest
Bases: BaseDataModel
Add memory request object
Attributes
agent_pkid
class-attribute
instance-attribute
child_memory_pkids
class-attribute
instance-attribute
child_memory_pkids: List[str] = Field(
default_factory=list,
title="Child Memory PKIDs",
description="List of child memory PKIDs for integrated memories only",
)
collection_pkid
class-attribute
instance-attribute
collection_pkid: str = Field(
...,
title="Collection PKID",
description="Primary key of the owning Collection",
)
importance_score
class-attribute
instance-attribute
importance_score: int = Field(
default=5,
title="Importance Score",
description="Importance score of the memory as determined by the agent. Derived via LLM call.",
)
memo
class-attribute
instance-attribute
memory_txt
class-attribute
instance-attribute
memory_type
class-attribute
instance-attribute
memory_type: MemoryType = Field(
..., title="Memory Type", description="Type of memory"
)
GetMemoriesResponse
Bases: BaseDataModel
Get memories response object
Attributes
all_memories
class-attribute
instance-attribute
all_memories: List[RetrievedMemory] = Field(
default_factory=list,
title="All Memories",
description="List of all retrieved memories prior to filtering.",
)
collection_summary
class-attribute
instance-attribute
collection_summary: List[
Dict[str, Dict[str, Union[float, int, List[float]]]]
] = Field(
default_factory=list,
title="Collection Summary",
description="Descriptive statistics by collection on filtered_memories. The intended use case is to provide quantitative insights into how each memory collection contributed to the recalled memories. Collections are ranked in descending order by count.",
)
context
class-attribute
instance-attribute
context_chunks
class-attribute
instance-attribute
context_chunks: List[str] = Field(
default_factory=list,
title="Context Chunks",
description="Context refers to the input used to lookup memory vectors. Large contexts that exceed the maximum size of the vector embedding need to be split into chunks before a lookup can be performed.",
)
filtered_memories
class-attribute
instance-attribute
filtered_memories: List[RetrievedMemory] = Field(
default_factory=list,
title="Filtered Memories",
description="List of retrieved memories after filtering operations were performed. This is the list of memories that were used to derive the actual recalled memories",
)
importance_alpha
class-attribute
instance-attribute
importance_alpha: float = Field(
...,
le=1.0,
ge=0.0,
title="Importance Alpha",
description="Importance alpha",
)
max_memories
class-attribute
instance-attribute
max_memory_strategy
class-attribute
instance-attribute
max_memory_strategy: str = Field(
...,
title="Max Memory Strategy",
description="Max memory strategy used for recall operation",
)
min_score
class-attribute
instance-attribute
min_score: float = Field(
...,
le=1.0,
gt=0.0,
title="Minimum Score",
description="Minimum score needed to be considered for recall",
)
recalled_memories
class-attribute
instance-attribute
recalled_memories: List[str] = Field(
default_factory=list,
title="Recalled Memories",
description="List of recalled memories, derived from filtered_memories",
)
recency_alpha
class-attribute
instance-attribute
recency_alpha: float = Field(
...,
le=1.0,
ge=0.0,
title="Recency Alpha",
description="Recency alpha",
)
relevance_alpha
class-attribute
instance-attribute
relevance_alpha: float = Field(
...,
le=1.0,
ge=0.0,
title="Relevance Alpha",
description="Relevance alpha",
)
RetrievedMemory
Bases: BaseDataModel
Retrieved memory object
Attributes
access_count
class-attribute
instance-attribute
access_count: int = Field(
...,
title="Access Count",
description="Number of times the memory has been accessed",
)
access_dt
class-attribute
instance-attribute
access_dt: datetime = Field(
...,
title="Access Date",
description="Date and time of the last access",
)
collection_name
class-attribute
instance-attribute
collection_name: str = Field(
...,
title="Collection Name",
description="Name of the collection which the memory belongs to",
)
importance
class-attribute
instance-attribute
importance_score
class-attribute
instance-attribute
importance_score: float = Field(
default=0.0,
title="Importance Score",
description="Calculated importance score of the memory",
)
memory_txt
class-attribute
instance-attribute
overall_score
class-attribute
instance-attribute
overall_score: float = Field(
default=0.0,
title="Overall Score",
description="Calculated overall score of the memory",
)
pkid
class-attribute
instance-attribute
recency_score
class-attribute
instance-attribute
recency_score: float = Field(
default=0.0,
title="Recency Score",
description="Calculated recency score of the memory",
)
reduction_refs
class-attribute
instance-attribute
reduction_refs: int = Field(
...,
title="Reduction References",
description="Number of reduction references",
)