You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the RAG playground example the chatbot should maintain a conversation history so that users can ask follow up questions.
This should be achievable by including the agent's session_id in the session_state and using stremlit's cache_resource feature to prevent the agent from re-initializing constantly.
💡 Why is this needed? What if we don't build it?
This functionality is needed as it is a common feature in many existing chatbot applications. Also, it will allow for an improved user experience.
Other thoughts
No response
The text was updated successfully, but these errors were encountered:
…ation (#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 <[email protected]>
🚀 Describe the new functionality needed
When using the RAG playground example the chatbot should maintain a conversation history so that users can ask follow up questions.
This should be achievable by including the agent's session_id in the
session_state
and using stremlit'scache_resource
feature to prevent the agent from re-initializing constantly.💡 Why is this needed? What if we don't build it?
This functionality is needed as it is a common feature in many existing chatbot applications. Also, it will allow for an improved user experience.
Other thoughts
No response
The text was updated successfully, but these errors were encountered: