mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
fix: use correct msg_out/msg_err keys for Agent Engine sandbox output
PiperOrigin-RevId: 874126181
This commit is contained in:
committed by
Copybara-Service
parent
4ca904f111
commit
b1e33a90b4
@@ -134,8 +134,8 @@ class AgentEngineSandboxCodeExecutor(BaseCodeExecutor):
|
||||
or 'file_name' not in output.metadata.attributes
|
||||
):
|
||||
json_output_data = json.loads(output.data.decode('utf-8'))
|
||||
stdout = json_output_data.get('stdout', '')
|
||||
stderr = json_output_data.get('stderr', '')
|
||||
stdout = json_output_data.get('msg_out', '')
|
||||
stderr = json_output_data.get('msg_err', '')
|
||||
else:
|
||||
file_name = ''
|
||||
if (
|
||||
|
||||
@@ -71,7 +71,7 @@ class TestAgentEngineSandboxCodeExecutor:
|
||||
mock_json_output = MagicMock()
|
||||
mock_json_output.mime_type = "application/json"
|
||||
mock_json_output.data = json.dumps(
|
||||
{"stdout": "hello world", "stderr": ""}
|
||||
{"msg_out": "hello world", "msg_err": ""}
|
||||
).encode("utf-8")
|
||||
mock_json_output.metadata = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user