fix: updated ChatOutput component not working with streaming enabled (#6747)
* fix: updated ChatOutput component not working with streaming enabled (#6744)
fixes: 69df913a14
Updated to handle the forgotten Generator case for self.input_value (encountered when streaming is enabled).
Overhauled the chat.py under outputs to (mostly) pass strict type checking, something which could have prevented this bug.
Only this file has been changed. The only type errors in this file are in the safe_convert function and are due to problems in other files.
To prevent further problems in the future, the project should work towards enabling strict type checking permanently after fixing the vast number of type problems.
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* update templates and make sure they support streaming without making breaking chnages
* update templates
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
This commit is contained in:
parent
4ef4c93bac
commit
e82c21825b
28 changed files with 67 additions and 39 deletions
|
|
@ -94,5 +94,5 @@ class TestChatOutput(ComponentTestBaseWithClient):
|
|||
await component.message_response()
|
||||
|
||||
component.input_value = 123 # Invalid type
|
||||
with pytest.raises(TypeError, match="Expected Data or DataFrame or Message or str"):
|
||||
with pytest.raises(TypeError, match="Expected Data or DataFrame or Message or str, Generator or None"):
|
||||
await component.message_response()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue