Skip to content

Commit

Permalink
add envs to chat_with_workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yzld2002 committed Sep 5, 2024
1 parent d3ba8ee commit fdf80f8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions vision_agent/agent/vision_agent_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 = []
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit fdf80f8

Please sign in to comment.