Skip to content

Commit

Permalink
支持输入dict创建json输出
Browse files Browse the repository at this point in the history
  • Loading branch information
yepeiwen01 committed Jan 22, 2025
1 parent 0911ef3 commit 9ef4646
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/tests/test_base_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_valid_output_with_dict(self):
output9 = self.component.create_output(type="plan", text={"detail": "hello", "steps":[{"name": "1", "arguments": {"query": "a", "chat_history": "world"}}]})
output10 = self.component.create_output(type="function_call", text={"thought": "hello", "name": "AppBuilder", "arguments": {"query": "a", "chat_history": "world"}})
output11 = self.component.create_output(type="references", text={"type": "engine", "doc_id": "1", "content": "hello, world", "title": "Have a nice day", "source": "bing", "extra": {"key": "value"}})
output12 = self.component.create_output(type="json", text={"key": "value"})
output12 = self.component.create_output(type="json", text={"data": "value"})
self.assertIsInstance(output1, ComponentOutput)
self.assertIsInstance(output2, ComponentOutput)
self.assertIsInstance(output3, ComponentOutput)
Expand Down

0 comments on commit 9ef4646

Please sign in to comment.