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
[SHIP-834] [SHIP-818] Streaming Generators #548
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.
LGTM! This is really exciting
class StreamState(str, Enum): | ||
STARTED = "started" # A producer has begun streaming to this block. | ||
COMPLETE = "complete" # The producer has finished streaming to this block successfully. | ||
ABORTED = "aborted" # The producer finished streaming to the block, but there was an error. |
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.
nit: I don't think this is a huge deal, but if you wanted to align with the enums we use in the task system I think these would be: running
, succeeded
, failed
@@ -335,6 +344,24 @@ def as_llm_input(self, exclude_block_wrapper: Optional[bool] = False) -> str: | |||
return f"{self.id}" | |||
return f"Block({self.id})" | |||
|
|||
def finish_stream(self): |
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.
Oh I see you were aiming for alignment with these routes
This PR includes:
Block
for streamingDepends on: https://github.com/nludb/nludb/pull/631
(tests will fail until deploy of above)