Skip to main content
This recipe uses the same flow as the FastAPI recipe. Recall memory, answer with Azure OpenAI, then store the new turn.
1

Install

2

Set environment variables

3

Construct clients

4

Implement answer(query, session_id)

5

Smoke-test from __main__

Production notes

  • Citations: pass hit ids into the prompt and ask the model to quote [mem:<id>]. Use that id to link answers back to memory.
  • Weak recall: if confidence < 0.4, call tex.recall(..., mode="deep") once before answering.
  • Streaming: set stream=True, then enqueue remember in a background worker so the stream can start quickly.