Chat with MemOS for a specific user. Returns SSE stream.
This endpoint uses the class-based ChatHandler which internally composes SearchHandler and AddHandler for a clean architecture.
Request model for chat operations.
This model is used as the algorithm-facing chat interface, while also remaining backward compatible with older developer-facing APIs.
User ID
Chat query message
List of cube IDs user can read for multi-cube chat
List of cube IDs user can write for multi-cube chat
Chat history
search mode: fast, fine, or mixture
fast, fine, mixture Base system prompt to use for chat
Number of results to return
Session ID for soft-filtering memories
Whether to handle preference memory
Number of preference results to return
Model name to use for chat
Max tokens to generate
Temperature for sampling
Top-p (nucleus) sampling parameter
Add dialogs to memory after chat
Filter for the memory, example:
{
"`and` or `or`": [
{"id": "uuid-xxx"},
{"created_at": {"gt": "2024-01-01"}},
]
}Whether to use internet search
Threshold for filtering references
(Deprecated) Whether to use legacy MemOSCube pipeline.
(Deprecated) Single cube ID to use for chat. Prefer readable_cube_ids / writable_cube_ids for multi-cube chat.
Successful Response