diff --git a/ai/processor.py b/ai/processor.py index d80d8a1..5fd105e 100644 --- a/ai/processor.py +++ b/ai/processor.py @@ -62,13 +62,21 @@ class AIProcessor: processor=self, ) outputs.append(r) if r else None + if reexec: + img = ai.compute.screenshot_to_base64( + ai.compute.take_screenshot() + ) + + outputs.append( + *self.process(nextsteps, img) + ) return [ { "name": tc.function.name, "arguments": json.loads(tc.function.arguments), } for tc in tool_calls - ] + ] + outputs # type: ignore # otherwise return final assistant content print(f"Response: {json.dumps(response.to_dict(), indent=4)}") # debug