Skip to content

Remove dead code related to non-CompletionDelta streaming results #1248

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

Conversation

albertvillanova
Copy link
Member

Remove dead code related to non-CompletionDelta streaming results.

Follow-up to:

Comment on lines -1295 to +1297
if isinstance(event, CompletionDelta):
if event.content is not None:
output_text += event.content
live.update(Markdown(output_text))
elif isinstance(event, ToolCall):
memory_step.tool_calls = [event]
if event.content is not None:
output_text += event.content
live.update(Markdown(output_text))
Copy link
Member Author

Choose a reason for hiding this comment

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

@aymeric-roucher: streaming always yields CompletionDelta instances, or am I missing something?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes indeed! The handling of specific object for ToolCalls should be let for when/if we activate streaming outputs in ToolCallingAgent

@albertvillanova albertvillanova marked this pull request as ready for review April 25, 2025 07:46
@albertvillanova albertvillanova merged commit 05b709d into huggingface:main Apr 25, 2025
3 checks passed
@albertvillanova albertvillanova deleted the fu-1236-fix-stream-tool-call branch April 25, 2025 07:46
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