fix: Ensure that we properly format data outputs in the chat (#8132)

* fix: If a list is returned, make sure we convert to string

* Prettify the data output

* Updates based on feedback, safe encoding

* Fix chat output unit test

* Ensure all starter projects are updated
This commit is contained in:
Eric Hare 2025-05-20 10:21:51 -07:00 • committed by GitHub
commit 6c58c6efc3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 51 additions and 41 deletions

View file

@ -53,7 +53,7 @@ class TestChatOutput(ComponentTestBaseWithClient):
data = Data(text="Test data message")
component.input_value = data
result = await component.message_response()
assert result.text == "Test data message"
assert result.text == '```json\n{\n "text": "Test data message"\n}\n```'
assert result.sender == MESSAGE_SENDER_AI
async def test_process_dataframe_input(self, component_class, default_kwargs):