Conversational Memory

MemorySettings

Memory base settings.

database: 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]]

Description: Database configuration. Default: None

prompt_utils: Optional[PromptUtilsSettings] = None

Description: Prompt utils configurations. Default: None

FileSysSettings

File system database configuration.

model_type: Literal["chat.completions"]

Description: The model type. Only "chat.completions" is supported for the Memory Runtime. Default: "chat.completions"

path: Union[str, Path]

Description: The path to the database. Default: "data"

window_size: int

Description: The number of messages to return from the conversation history including the system message. Default: 10

tensor_names: 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]

Description: The model type. Only "chat.completions" is supported for the Memory Runtime. Default: "chat.completions"

url: str

Description: The database URL.

connection_options: dict

Description: The connection options for the database. Default: {}

window_size: int

Description: The number of messages to return from the conversation history including the system message. Default: 10

tensor_names: List[str]

Description: The names of the tensors to store in the history. Default: ["role", "content", "type"]

Last updated

Was this helpful?