-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add support for additional_outputs in gr.ChatInterface
#7933
Comments
ChatInterface
ChatInterface
gr.ChatInterface
Hi @chengyjonathan yes I think we could add support for |
Or alternatively we could support the gr.File component in gr.Chatbot cc @dawoodkhan82 |
+1 currently I have to embed the additional outputs in the response itself. |
This works for me (until a better option in gradio):
The chatbot changes many times, but after the last change, the RAG_component shows the retrieved docs. A nicer solution requires some modifications in the source code, for example:
Then, an event listener can be set up, which only acts once after the response is generated: |
+1 for this. It could be useful for a stateful chatbot. E.g. def bot_fn(message, history, session_state, <additional_inputs>):
return bot_message, session_state |
Is your feature request related to a problem? Please describe.
I'm trying to setup a ChatInterface() Where I can get the output documents that were retrieved along with the response. Ie. if my input query fn outputs both a list of strings for the retrieved docs and a response str, I want to be able to send that list of retrieved docs to a different compoenent.
Describe the solution you'd like
Idk if this is easier than I think it is, but I'd appreciate a way to implement this (if this doesn't exist already). Where I can supply a fn that returns both a response and a list of documents
The text was updated successfully, but these errors were encountered: