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

Fix chatbot/chatinterface type mismatch #10080

Merged
merged 4 commits into from
Dec 1, 2024
Merged

Fix chatbot/chatinterface type mismatch #10080

merged 4 commits into from
Dec 1, 2024

Conversation

abidlabs
Copy link
Member

@abidlabs abidlabs commented Nov 29, 2024

@abidlabs abidlabs requested a review from hannahblair November 29, 2024 19:43
@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Nov 29, 2024

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website ready! Website preview
🦄 Changes detecting...

Install Gradio from this PR

pip install https://gradio-pypi-previews.s3.amazonaws.com/4bce97cfd494cef3bb004bd7d3f0cb1bad5009ae/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@4bce97cfd494cef3bb004bd7d3f0cb1bad5009ae#subdirectory=client/python"

Install Gradio JS Client from this PR

npm install https://gradio-npm-previews.s3.amazonaws.com/4bce97cfd494cef3bb004bd7d3f0cb1bad5009ae/gradio-client-1.8.0.tgz

Use Lite from this PR

<script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/4bce97cfd494cef3bb004bd7d3f0cb1bad5009ae/dist/lite.js""></script>

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Nov 29, 2024

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
gradio patch
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Fix chatbot/chatinterface type mismatch

Maintainers or the PR author can modify the PR title to modify this entry.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

@abidlabs abidlabs added the v: patch A change that requires a patch release label Nov 29, 2024
Copy link
Collaborator

@aliabd aliabd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good and I tested locally and error is gone. Though might still be worth waiting for @hannahblair to take a look.

Just a note, if you have chatbot with no type and add type="messages" to chatinterface you end up with confusing/conflicting warnings

UserWarning: You have not specified a value for the `type` parameter. Defaulting to the 'tuples' format for chatbot messages, but this is deprecated and will be removed in a future version of Gradio. Please set type='messages' instead, which uses openai-style dictionaries with 'role' and 'content' keys.

UserWarning: The type of the gr.Chatbot does not match the type of the gr.ChatInterface.The type of the gr.ChatInterface, 'messages', will be used.

but i don't think its worth fixing because it kind of follows correctly.

Copy link
Collaborator

@hannahblair hannahblair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @abidlabs!

@abidlabs
Copy link
Member Author

abidlabs commented Dec 1, 2024

Great thanks folks!

@abidlabs abidlabs merged commit ebe25bc into main Dec 1, 2024
22 checks passed
@abidlabs abidlabs deleted the chatinterface-type branch December 1, 2024 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v: patch A change that requires a patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants