From fdf80f8b90245d42fdd9d0f5fe930db3a9c4cf9b Mon Sep 17 00:00:00 2001 From: Zhichao Date: Thu, 5 Sep 2024 11:36:13 +0800 Subject: [PATCH] add envs to chat_with_workflow --- vision_agent/agent/vision_agent_coder.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vision_agent/agent/vision_agent_coder.py b/vision_agent/agent/vision_agent_coder.py index dd893d1d..2805cead 100644 --- a/vision_agent/agent/vision_agent_coder.py +++ b/vision_agent/agent/vision_agent_coder.py @@ -675,6 +675,7 @@ def chat_with_workflow( test_multi_plan: bool = True, display_visualization: bool = False, customized_tool_names: Optional[List[str]] = None, + envs: Optional[Dict[str, str]] = None, ) -> Dict[str, Any]: """Chat with VisionAgentCoder and return intermediate information regarding the task. @@ -703,7 +704,7 @@ def chat_with_workflow( # NOTE: each chat should have a dedicated code interpreter instance to avoid concurrency issues with CodeInterpreterFactory.new_instance( - code_sandbox_runtime=self.code_sandbox_runtime + code_sandbox_runtime=self.code_sandbox_runtime, envs=envs ) as code_interpreter: chat = copy.deepcopy(chat) media_list = [] @@ -859,7 +860,9 @@ def _create_plans( plans = write_plans( int_chat, T.get_tool_descriptions_by_names( - customized_tool_names, T.FUNCTION_TOOLS, T.UTIL_TOOLS # type: ignore + customized_tool_names, + T.FUNCTION_TOOLS, + T.UTIL_TOOLS, # type: ignore ), format_memory(working_memory), planner,