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

Allowing Customization of Stream Return Type in CreateChatCompletionStream #887

Open
MrHuangjiacong opened this issue Oct 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@MrHuangjiacong
Copy link

Description

I would like to propose an enhancement to the CreateChatCompletionStream functionality in order to allow customization of the stream return type. Specifically, I am interested in being able to extend the ChatCompletionStreamResponse structure with additional fields. Currently, this customization is not directly supported.

Proposed Solution

To address this limitation, I suggest the following changes:
1.Adding Extensibility: Enable users to add custom fields to the ChatCompletionStreamResponse structure.
2.Public Access: Make the methods and fields within streamReader, sendRequestStream, and c.newRequest public for easier customization and model integration.

Additional Context

The ability to customize the stream return type and access the internal methods and fields would greatly enhance the flexibility and usability of the CreateChatCompletionStream feature. This would allow users to integrate custom models more seamlessly and tailor the stream responses to their specific needs.

Proposed Changes

1.Allow customization of the ChatCompletionStreamResponse structure.
2.Make the methods and fields within streamReader, sendRequestStream, and c.newRequest public for easier customization.
Your feedback and consideration on this feature request would be greatly appreciated.

@MrHuangjiacong MrHuangjiacong added the enhancement New feature or request label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant