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

Add support for chat streaming #6

Open
markjamesm opened this issue Dec 17, 2023 · 0 comments
Open

Add support for chat streaming #6

markjamesm opened this issue Dec 17, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@markjamesm
Copy link
Owner

Need to add support for streaming. You can specify streamlining as a parameter in the ChatRequest class, and it is defined as:

//  Default: false
// Whether to stream back partial progress. If set, tokens will be sent as data-only server-sent events
// as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will
// hold the request open until the timeout or until completion, with the response containing the full
// result as JSON.
Stream = false,

The best way to implement it would be to add a check to the ChatAsync() method, and if the ChatRequest Stream is set to false, default to the standard HTTPClient PostAsync call. If true, then setup a stream.

@markjamesm markjamesm added the enhancement New feature or request label Dec 17, 2023
@markjamesm markjamesm added this to the 1.0 milestone Dec 17, 2023
@markjamesm markjamesm self-assigned this Dec 17, 2023
@markjamesm markjamesm added the good first issue Good for newcomers label Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant