llama-stack/llama_stack/distribution/ui/page
Michael Clifford c6e93e32f6
feat: Updated playground rag to use session id for persistent conversation (#1870)
# What does this PR do?

This PR updates the [playground RAG
example](llama_stack/distribution/ui/page/playground/rag.py) so that the
agent is able to use its builtin conversation history. Here we are using
streamlit's `cache_resource` functionality to prevent the agent from
re-initializing after every interaction as well as storing its
session_id in the `session_state`. This allows the agent in the RAG
example to behave more closely to how it works using the python-client
directly.

[//]: # (If resolving an issue, uncomment and update the line below)
Closes #1869 

## Test Plan

Without these changes, if you ask it "What is 2 + 2"? followed by the
question "What did I just ask?" It will provide an obviously incorrect
answer.

With these changes, you can ask the same series of questions and it will
provide the correct answer.

[//]: # (## Documentation)

Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2025-04-08 09:46:13 +02:00
..
distribution fix: Fixed import errors for UI and playground (#1666) 2025-03-18 15:00:48 -07:00
evaluations fix: Fixed import errors for UI and playground (#1666) 2025-03-18 15:00:48 -07:00
playground feat: Updated playground rag to use session id for persistent conversation (#1870) 2025-04-08 09:46:13 +02:00
__init__.py [llama stack ui] add native eval & inspect distro & playground pages (#541) 2024-12-04 09:47:09 -08:00