Value Structure

Each stored value consists of the following fields:

  • query_text: The user's input/query.

  • response_text: The system's response.

  • entities: A list containing metadata:

    • time: Timestamp when the memory was stored.

    • memory_id: Matches the memory ID in the key.

    • context_id: Matches the context ID in the key.

    • memory_quality: A rating representing the quality of the memory. Memory quality is stored as 1 by default, which means a "good" memory, while 0 indicates a "bad" memory.

  • metadata: Additional information:

    • context_entity_id: Matches the context entity ID in the key.

    • user_uuid: Matches the user UUID in the key.

Default Value Structure

value = {
    "query_text": memory['query_text'],
    "response_text": memory['response_text'],
    "entities": [
        {
            "time": memory['time'],
            "memory_id": memory_context['memory_id'],
            "context_id": memory_context['context_id'],
            "memory_quality": 1  # Default memory quality
        }
    ],
    "metadata": {"context_entity_id": memory_context['context_entity_id'], "user_uuid": user_uuid}
}

Example of the Value Structure

Last updated