# 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"]`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seldon.ai/llm-module/resources/reference/memory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
