From cdec7067f9ecef71f6538a47f622f1781809b42c Mon Sep 17 00:00:00 2001 From: killian <63927363+KillianLucas@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:49:24 -0800 Subject: [PATCH] Downgrade httpx, fix tool outputs --- interpreter/interpreter.py | 11 +++++++++++ pyproject.toml | 1 + 2 files changed, 12 insertions(+) diff --git a/interpreter/interpreter.py b/interpreter/interpreter.py index 771fcc655..473691912 100644 --- a/interpreter/interpreter.py +++ b/interpreter/interpreter.py @@ -889,6 +889,17 @@ async def async_respond(self, user_input=None): result = ToolResult(output="Tool execution cancelled by user") if self.tool_calling: + if result.error: + output = result.error + else: + output = result.output + self.messages.append( + { + "role": "tool", + "content": output, + "tool_call_id": tool_call.id, + } + ) if result.base64_image: self.messages.append( { diff --git a/pyproject.toml b/pyproject.toml index 3cd1aaf9a..ec3f7d39b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,7 @@ readchar = "^4.2.1" pillow = "^11.0.0" uvicorn = "^0.32.0" pynput = "^1.7.7" +httpx = "0.27.2" [build-system] requires = ["poetry-core>=1.0.0"]