Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Updated playground rag to use session id for persistent conversation #1870

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

MichaelClifford
Copy link
Contributor

What does this PR do?

This PR updates the playground RAG example 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.

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.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 3, 2025
@MichaelClifford MichaelClifford changed the title Feat: Updated playground rag to use session id for persistent conversation feat: Updated playground rag to use session id for persistent conversation Apr 3, 2025
@leseb leseb merged commit c6e93e3 into meta-llama:main Apr 8, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use session_id to maintain ongoing chat in RAG playground example
3 participants