Conversational Memory
MemorySettings
Memory base settings.
database: Literal["filesys", "sql"]
Literal["filesys", "sql"]Description: Supported Database backends. The "filesys" backend is recommended only for testing/development purposes - persists memory data to local file system. The "sql" backend any SQL database supported by SQLAlchemy. Namely, SQLite, PostgreSQL, MySQL, etc.
config: Optional[Union[FileSysSettings, SQLSettings]]
Optional[Union[FileSysSettings, SQLSettings]]Description: Database configuration.
Default: None
prompt_utils: Optional[PromptUtilsSettings] = None
Optional[PromptUtilsSettings] = NoneDescription: Prompt utils configurations.
Default: None
FileSysSettings
File system database configuration.
model_type: Literal["chat.completions"]
Literal["chat.completions"]Description: The model type. Only "chat.completions" is supported for the Memory Runtime.
Default: "chat.completions"
path: Union[str, Path]
path: Union[str, Path]Description: The path to the database.
Default: "data"
window_size: int
intDescription: The number of messages to return from the conversation history including the system message.
Default: 10
tensor_names: List[str]*
List[str]*Description: The names of the tensors to store in the history.
Default: ["role", "content", "type"]
SQLSettings
SQL database configuration.
model_type: Literal[chat.completions]
Literal[chat.completions]Description: The model type. Only "chat.completions" is supported for the Memory Runtime.
Default: "chat.completions"
url: str
strDescription: The database URL.
connection_options: dict
dictDescription: The connection options for the database.
Default: {}
window_size: int
intDescription: The number of messages to return from the conversation history including the system message.
Default: 10
tensor_names: List[str]
List[str]Description: The names of the tensors to store in the history.
Default: ["role", "content", "type"]
Last updated
Was this helpful?