Skip to content

Commit cdec706

Browse files
committed
Downgrade httpx, fix tool outputs
1 parent 798c35e commit cdec706

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

interpreter/interpreter.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,17 @@ async def async_respond(self, user_input=None):
889889
result = ToolResult(output="Tool execution cancelled by user")
890890

891891
if self.tool_calling:
892+
if result.error:
893+
output = result.error
894+
else:
895+
output = result.output
896+
self.messages.append(
897+
{
898+
"role": "tool",
899+
"content": output,
900+
"tool_call_id": tool_call.id,
901+
}
902+
)
892903
if result.base64_image:
893904
self.messages.append(
894905
{

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ readchar = "^4.2.1"
2525
pillow = "^11.0.0"
2626
uvicorn = "^0.32.0"
2727
pynput = "^1.7.7"
28+
httpx = "0.27.2"
2829

2930
[build-system]
3031
requires = ["poetry-core>=1.0.0"]

0 commit comments

Comments
 (0)