Skip to content

Fix return type hint for generate_stream and rename CompletionDelta to ChatMessageStreamDelta #1247

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

Merged
merged 5 commits into from
Apr 28, 2025

Conversation

albertvillanova
Copy link
Member

@albertvillanova albertvillanova commented Apr 25, 2025

Fix return type hint for generate_stream.

Follow-up to:

@aymeric-roucher, would it may be worth to rename CompletionDelta to something more explicit? Maybe ChatMessageDelta or ChatMessageStreamDelta?

  • Current name makes no mention to chat message
  • The word 'completion' was not used for the non-stremaing case: ChatMessage

@aymeric-roucher
Copy link
Collaborator

The name for the ~corresponding object in huggingface_hub library is ChatCompletionStreamOutputDelta : maybe we could go with ChatMessageStreamDelta indeed!

@albertvillanova albertvillanova changed the title Fix return type hint for generate_stream Fix return type hint for generate_stream and rename CompletionDelta to ChatMessageStreamDelta Apr 25, 2025
Copy link
Collaborator

@aymeric-roucher aymeric-roucher left a comment

Choose a reason for hiding this comment

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

THank you @albertvillanova !

@albertvillanova albertvillanova merged commit 8758ef3 into huggingface:main Apr 28, 2025
3 checks passed
@albertvillanova albertvillanova deleted the fu-1242 branch April 28, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants