-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Support additional_outputs
in gr.ChatInterface
#10071
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/591dcd0e324782bf8d635d63e21b26deaacdb0e4/gradio-5.7.1-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@591dcd0e324782bf8d635d63e21b26deaacdb0e4#subdirectory=client/python" Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/591dcd0e324782bf8d635d63e21b26deaacdb0e4/gradio-client-1.8.0.tgz Use Lite from this PR <script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/591dcd0e324782bf8d635d63e21b26deaacdb0e4/dist/lite.js""></script> |
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
gr.ChatInterface
additional_outputs
in gr.ChatInterface
warnings.warn( | ||
"The type of the chatbot does not match the type of the chat interface. The type of the chat interface will be used." | ||
"Recieved type of chatbot: {chatbot.type}, type of chat interface: {self.type}" | ||
with Column(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Column()
is needed b/c otherwise if you put gr.ChatInterface
in a gr.Row()
, the textbox appears to the right of the chatbot instead of below it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything LGTM! thanks @abidlabs
Note to self: add link to demo since |
…o additional-outputs
Works great! Screen.Recording.2024-12-02.at.4.12.56.PM.mov |
if requirements: | ||
encoded_reqs = base64.b64encode(requirements.encode('utf-8')).decode('utf-8') | ||
encoded_reqs_url = urllib.parse.quote(encoded_reqs, safe='') | ||
playground_url += "&reqs=" + encoded_reqs_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool that it handles reqs as well!
Nice @aliabd! I'm going to get this in |
See:
demo/chatinterface_artifacts/run.py
for a simple exampleCloses: #7933
Some minor fixes to the docs as well