-
Notifications
You must be signed in to change notification settings - Fork 0
Add QueryAgent streaming #11
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orca Security Scan Summary
Status | Check | Issues by priority | |
---|---|---|---|
![]() |
Secrets | ![]() ![]() ![]() ![]() |
View in Orca |
* @param init - The request init options. | ||
* @returns An async generator of ServerSentEvent objects. | ||
*/ | ||
export async function* fetchServerSentEvents( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you checked https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events?
looks very easy to implement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, that's a shame :/
Adds an option to stream from the
QueryAgent
, by consuming the server-sent-events API on the backend. This new method yields objects providing progress messages (e.g.,Analyzing Query...
) as well as per-token streaming of the final answer, before the final state (like from.run()
).This new method can be used as follows: