session
Session settings module
Classes
SessionResourceSettings
Bases: BaseModel
Per session dynamic (DB enabled) configuration settings.
Attributes:
-
memory
(MemorySettings
) –Session Memory Settings
-
collection_overrides
(Dict
) –Agent Memory Collection Overrides
-
sync_chat
(bool
) –Synchronous Chat Flag
-
override_importance
(int
) –Override Importance
Attributes
collection_overrides
class-attribute
instance-attribute
collection_overrides: Dict = Field(
default_factory=dict,
title="Agent Memory Collection Overrides",
description="A map of agent names to memory collection names that when provided, will override the default episodic memory collection for the agent.",
)
memory
class-attribute
instance-attribute
memory: MemorySettings = Field(
default_factory=MemorySettings,
title="Session Memory Settings",
description=__doc__,
)
override_importance
class-attribute
instance-attribute
override_importance: int = Field(
default=0,
title="Override Importance",
description="When > 0, the importance calculation logic will be bypassed when creating new memories. The intended use case is to more quickly build new semantic memory collections (since the importance calculation is expensive). Downsides to hardcoded importance can be mitigated by merging the semantic memory collection into an agent's episodic memories. Moreover, importance scores will be re-calculated periodically anyway (#113) by agents. Some implementation notes: first this setting is applied to the session that the memory is created, therefore it must be determined ahead of time which memories need to have their importance scores overridden. Additionally, this setting applies to all memory types (observation, integration, etc). See #121.",
)
sync_chat
class-attribute
instance-attribute
sync_chat: bool = Field(
default=False,
title="Synchronous Chat Flag",
description="When set to true, agent responses from the chat completions API will block until all operations are completed (such as generate new memories). This is useful whenever responses should be generated in sequence (such as reading a corpus) and memories need to be available for subsequent requests.",
)