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

Enhance streamUI to Include providerMetadata in Final Stream for Improved Access to Additional Information #4892

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SalmanK81099
Copy link
Contributor

This pull request introduces an enhancement to the streamUI function by including the providerMetadata in the final stream output. This change addresses the need for accessing additional information, such as citations in perplexity provider response, which were previously inaccessible.

Key Changes:

  • Added providerMetadata to the final stream output of the streamUI function.
  • This enhancement allows users to retrieve important metadata that can be crucial for various use cases, particularly in scenarios where detailed information is required for analysis or reporting.

Benefits:

  • Improves the functionality of the streamUI by providing access to essential metadata.
  • Facilitates better handling of complex scenarios where additional context is necessary for accurate processing and understanding of the model's output or for other purposes.
  • This update aims to enhance the overall usability and flexibility of the streamUI function, ensuring that users have the necessary tools to work with the model's output effectively.

@SalmanK81099 SalmanK81099 marked this pull request as draft February 15, 2025 09:42
@SalmanK81099 SalmanK81099 marked this pull request as ready for review February 15, 2025 09:42
@fengxinyu96325
Copy link

goodjob

/**
* The provider metadata.
*/
providerMetadata: ProviderMetadata<{
Copy link
Contributor

@Und3rf10w Und3rf10w Feb 27, 2025

Choose a reason for hiding this comment

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

Why not set this to providerMetadata: ProviderMetadata instead of only supporting the perplexity metadata?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @Und3rf10w , just fixed it.

@SalmanK81099 SalmanK81099 requested a review from Und3rf10w March 21, 2025 09:20
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.

3 participants