llama-stack/llama_stack/distribution
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
..
routers fix(api): don't return list for runtime tools (#1686) 2025-04-01 09:53:11 +02:00
server fix: Use CONDA_DEFAULT_ENV presence as a flag to use conda mode (#1555) 2025-03-27 17:13:22 -04:00
store fix: handle registry errors gracefully (#1732) 2025-03-20 15:24:07 -07:00
ui feat: Updated playground rag to use session id for persistent conversation (#1870) 2025-04-08 09:46:13 +02:00
utils fix: multiple issues with getting_started notebook (#1795) 2025-03-26 10:59:12 -07:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
access_control.py feat: make sure agent sessions are under access control (#1737) 2025-03-21 07:31:16 -07:00
build.py refactor: simplify command execution and remove PTY handling (#1641) 2025-03-17 15:03:14 -07:00
build_conda_env.sh chore: remove straggler references to llama-models (#1345) 2025-03-01 14:26:03 -08:00
build_container.sh fix: Add missing gcc in container build. Fixes #1716 (#1727) 2025-03-20 15:50:56 -04:00
build_venv.sh chore: remove straggler references to llama-models (#1345) 2025-03-01 14:26:03 -08:00
client.py chore: move all Llama Stack types from llama-models to llama-stack (#1098) 2025-02-14 09:10:59 -08:00
common.sh fix: Fixing some small issues with the build scripts (#1132) 2025-02-19 22:20:49 -08:00
configure.py feat: add provider API for listing and inspecting provider info (#1429) 2025-03-13 15:07:21 -07:00
datatypes.py feat(server): add attribute based access control for resources (#1703) 2025-03-19 21:28:52 -07:00
distribution.py feat: add provider API for listing and inspecting provider info (#1429) 2025-03-13 15:07:21 -07:00
inspect.py chore: deprecate /v1/inspect/providers (#1678) 2025-03-19 20:27:06 -07:00
library_client.py fix(telemetry): library client does not log span (#1833) 2025-03-29 14:55:31 -07:00
providers.py fix: add shutdown method for ProviderImpl (#1670) 2025-03-17 14:55:40 -07:00
request_headers.py feat(server): add attribute based access control for resources (#1703) 2025-03-19 21:28:52 -07:00
resolver.py feat(api): don't return a payload on file delete (#1640) 2025-03-25 17:12:36 -07:00
stack.py feat: add provider API for listing and inspecting provider info (#1429) 2025-03-13 15:07:21 -07:00
start_stack.sh fix: multiple issues with getting_started notebook (#1795) 2025-03-26 10:59:12 -07:00