-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates the API for streaming sync mode to match streaming async
We can do this as we're still in 0.X.Y, but we'll be adding lots of documentation. Overall the structure is the same largely. We just: 1. yield intermediate_result, None 2. yield final_result, state_update This leaves open the possibility for multiple type (2) outputs. Note this is a lot -- some of the changes: 1. Unify the class structure for streaming/async -- switch on a few method definitions 2. Add a peek-ahead (in case we're at the end), only for the multi-step streaming (as we won't know). Nobody uses this (yet), and we have a chance to indicate by adding a `end` token at some point. 3. Adds quite a few more unit tests/updates them
- Loading branch information
1 parent
da1ba76
commit df8f6c8
Showing
8 changed files
with
609 additions
and
348 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.