vision-agent 0.2.133__py3-none-any.whl → 0.2.134__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -691,8 +691,9 @@ class CodeInterpreterFactory:
691
691
  if not code_sandbox_runtime:
692
692
  code_sandbox_runtime = os.getenv("CODE_SANDBOX_RUNTIME", "local")
693
693
  if code_sandbox_runtime == "e2b":
694
+ envs = _get_e2b_env()
694
695
  instance: CodeInterpreter = E2BCodeInterpreter(
695
- timeout=_SESSION_TIMEOUT, remote_path=remote_path
696
+ timeout=_SESSION_TIMEOUT, remote_path=remote_path, envs=envs
696
697
  )
697
698
  elif code_sandbox_runtime == "local":
698
699
  instance = LocalCodeInterpreter(
@@ -705,6 +706,20 @@ class CodeInterpreterFactory:
705
706
  return instance
706
707
 
707
708
 
709
+ def _get_e2b_env() -> Union[Dict[str, str], None]:
710
+ openai_api_key = os.getenv("OPENAI_API_KEY", "")
711
+ anthropic_api_key = os.getenv("ANTHROPIC_API_KEY", "")
712
+ if openai_api_key or anthropic_api_key:
713
+ envs = {}
714
+ if openai_api_key:
715
+ envs["OPENAI_API_KEY"] = openai_api_key
716
+ if anthropic_api_key:
717
+ envs["ANTHROPIC_API_KEY"] = anthropic_api_key
718
+ else:
719
+ envs = None
720
+ return envs
721
+
722
+
708
723
  def _parse_local_code_interpreter_outputs(outputs: List[Dict[str, Any]]) -> Execution:
709
724
  """Parse notebook cell outputs to Execution object. Output types:
710
725
  https://nbformat.readthedocs.io/en/latest/format_description.html#code-cell-outputs
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vision-agent
3
- Version: 0.2.133
3
+ Version: 0.2.134
4
4
  Summary: Toolset for Vision Agent
5
5
  Author: Landing AI
6
6
  Author-email: dev@landing.ai
@@ -22,12 +22,12 @@ vision_agent/tools/tools.py,sha256=WKeB99ED0o_ISS_vZc-ch_1Dc8_Fl2fhnGlfVNwNouc,7
22
22
  vision_agent/tools/tools_types.py,sha256=rLpCUODPY0yI65SLOTJOxfHFfqWM3WjOq-AYX25Chjk,2356
23
23
  vision_agent/utils/__init__.py,sha256=7fMgbZiEwbNS0fBOS_hJI5PuEYBblw36zLi_UjUzvj4,244
24
24
  vision_agent/utils/exceptions.py,sha256=booSPSuoULF7OXRr_YbC4dtKt6gM_HyiFQHBuaW86C4,2052
25
- vision_agent/utils/execute.py,sha256=7MW9GY0gwq1VjOIV07ds4xO11voPZ0Iu_RSfb8K98Y0,27263
25
+ vision_agent/utils/execute.py,sha256=BZ114WuP5oVk45E_uvUkCwYX-nmVQdNgBvhH3GegUnM,27748
26
26
  vision_agent/utils/image_utils.py,sha256=zTTOJFOieMzwIquTFnW7T6ssx9o6XfoZ0Unqyk7GJrg,10746
27
27
  vision_agent/utils/sim.py,sha256=ebE9Cs00pVEDI1HMjAzUBk88tQQmc2U-yAzIDinnekU,5572
28
28
  vision_agent/utils/type_defs.py,sha256=BE12s3JNQy36QvauXHjwyeffVh5enfcvd4vTzSwvEZI,1384
29
29
  vision_agent/utils/video.py,sha256=hOjfEOZNcddYdoa0CoviXA4Vo9kwURKuojIJgLLJdp0,4745
30
- vision_agent-0.2.133.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
31
- vision_agent-0.2.133.dist-info/METADATA,sha256=A95zjuoBeW_yaDMLZUU0aITAjXHXSiDBXXvfrmpfhGo,12252
32
- vision_agent-0.2.133.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
33
- vision_agent-0.2.133.dist-info/RECORD,,
30
+ vision_agent-0.2.134.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
31
+ vision_agent-0.2.134.dist-info/METADATA,sha256=nGDpQtIHLCuDkIo4Is_YfgtLhNNPT3_Os35lGn0UyoQ,12252
32
+ vision_agent-0.2.134.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
33
+ vision_agent-0.2.134.dist-info/RECORD,,