Context
Format
[preferences:fact-1]
User is vegetarian
[preferences:fact-2]
Allergic to peanutsUsage
ctx = client.recall_memory(
namespace="preferences",
prompt="What does the user eat?",
num_chunks=10,
)
# Use the formatted context in your own LLM call
messages = [
{"role": "system", "content": f"Use this context:\n{ctx.context}"},
{"role": "user", "content": "What should I order for lunch?"},
]Or Let Neocortex Handle It
Last updated