bug: stream buffer for output rails not able to handle metadata #1187
Labels
bug
Something isn't working
status: needs triage
New issues that have not yet been reviewed or categorized.
Did you check docs and existing issues?
Python version (python --version)
3.12.3
Operating system/version
Linux
NeMo-Guardrails version (if you must use a specific version and not the latest
0.14.0
Describe the bug
When using streaming-output rails with the
include_generation_metadata
flag some of the chunks generated by the streamhandler are not purestr
, but rather dictionaries containing a string token and some additional metadata.This creates some problem with the buffer consuming the streamingHandler queue: the buffer assumes all chunks in the queue to be strings. Thus the when concatenating the different chunks to obtain a partial prompt an error is raised.
Steps To Reproduce
Expected Behavior
Generate chunks containing additional metadata in the
async for
while running streaming output railsActual Behavior
The text was updated successfully, but these errors were encountered: