vision-agent 0.2.160__tar.gz → 0.2.161__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. {vision_agent-0.2.160 → vision_agent-0.2.161}/PKG-INFO +1 -1
  2. {vision_agent-0.2.160 → vision_agent-0.2.161}/pyproject.toml +1 -1
  3. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/agent/vision_agent.py +11 -3
  4. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/tools/meta_tools.py +3 -2
  5. {vision_agent-0.2.160 → vision_agent-0.2.161}/LICENSE +0 -0
  6. {vision_agent-0.2.160 → vision_agent-0.2.161}/README.md +0 -0
  7. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/__init__.py +0 -0
  8. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/agent/__init__.py +0 -0
  9. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/agent/agent.py +0 -0
  10. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/agent/agent_utils.py +0 -0
  11. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/agent/vision_agent_coder.py +0 -0
  12. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/agent/vision_agent_coder_prompts.py +0 -0
  13. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/agent/vision_agent_prompts.py +0 -0
  14. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/clients/__init__.py +0 -0
  15. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/clients/http.py +0 -0
  16. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/clients/landing_public_api.py +0 -0
  17. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/fonts/__init__.py +0 -0
  18. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/fonts/default_font_ch_en.ttf +0 -0
  19. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/lmm/__init__.py +0 -0
  20. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/lmm/lmm.py +0 -0
  21. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/lmm/types.py +0 -0
  22. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/tools/__init__.py +0 -0
  23. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/tools/prompts.py +0 -0
  24. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/tools/tool_utils.py +0 -0
  25. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/tools/tools.py +0 -0
  26. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/tools/tools_types.py +0 -0
  27. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/utils/__init__.py +0 -0
  28. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/utils/exceptions.py +0 -0
  29. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/utils/execute.py +0 -0
  30. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/utils/image_utils.py +0 -0
  31. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/utils/sim.py +0 -0
  32. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/utils/type_defs.py +0 -0
  33. {vision_agent-0.2.160 → vision_agent-0.2.161}/vision_agent/utils/video.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vision-agent
3
- Version: 0.2.160
3
+ Version: 0.2.161
4
4
  Summary: Toolset for Vision Agent
5
5
  Author: Landing AI
6
6
  Author-email: dev@landing.ai
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "vision-agent"
7
- version = "0.2.160"
7
+ version = "0.2.161"
8
8
  description = "Toolset for Vision Agent"
9
9
  authors = ["Landing AI <dev@landing.ai>"]
10
10
  readme = "README.md"
@@ -197,6 +197,7 @@ class VisionAgent(Agent):
197
197
  local_artifacts_path: Optional[Union[str, Path]] = None,
198
198
  code_sandbox_runtime: Optional[str] = None,
199
199
  callback_message: Optional[Callable[[Dict[str, Any]], None]] = None,
200
+ code_interpreter: Optional[CodeInterpreter] = None,
200
201
  ) -> None:
201
202
  """Initialize the VisionAgent.
202
203
 
@@ -207,12 +208,14 @@ class VisionAgent(Agent):
207
208
  local_artifacts_path (Optional[Union[str, Path]]): The path to the local
208
209
  artifacts file.
209
210
  code_sandbox_runtime (Optional[str]): The code sandbox runtime to use.
211
+ code_interpreter (Optional[CodeInterpreter]): if not None, use this CodeInterpreter
210
212
  """
211
213
 
212
214
  self.agent = AnthropicLMM(temperature=0.0) if agent is None else agent
213
215
  self.max_iterations = 12
214
216
  self.verbosity = verbosity
215
217
  self.code_sandbox_runtime = code_sandbox_runtime
218
+ self.code_interpreter = code_interpreter
216
219
  self.callback_message = callback_message
217
220
  if self.verbosity >= 1:
218
221
  _LOGGER.setLevel(logging.INFO)
@@ -284,9 +287,14 @@ class VisionAgent(Agent):
284
287
  # this is setting remote artifacts path
285
288
  artifacts = Artifacts(WORKSPACE / "artifacts.pkl")
286
289
 
287
- with CodeInterpreterFactory.new_instance(
288
- code_sandbox_runtime=self.code_sandbox_runtime,
289
- ) as code_interpreter:
290
+ code_interpreter = (
291
+ self.code_interpreter
292
+ if self.code_interpreter is not None
293
+ else CodeInterpreterFactory.new_instance(
294
+ code_sandbox_runtime=self.code_sandbox_runtime,
295
+ )
296
+ )
297
+ with code_interpreter:
290
298
  orig_chat = copy.deepcopy(chat)
291
299
  int_chat = copy.deepcopy(chat)
292
300
  last_user_message = chat[-1]
@@ -28,6 +28,7 @@ CURRENT_FILE = None
28
28
  CURRENT_LINE = 0
29
29
  DEFAULT_WINDOW_SIZE = 100
30
30
  ZMQ_PORT = os.environ.get("ZMQ_PORT", None)
31
+ VERBOSITY = os.environ.get("VERBOSITY", 0)
31
32
 
32
33
 
33
34
  def report_progress_callback(port: int, inp: Dict[str, Any]) -> None:
@@ -375,7 +376,7 @@ def generate_vision_code(
375
376
  )
376
377
  )
377
378
  else:
378
- agent = va.agent.VisionAgentCoder()
379
+ agent = va.agent.VisionAgentCoder(verbosity=int(VERBOSITY))
379
380
 
380
381
  fixed_chat: List[Message] = [{"role": "user", "content": chat, "media": media}]
381
382
  response = agent.chat_with_workflow(
@@ -438,7 +439,7 @@ def edit_vision_code(
438
439
  return dogs
439
440
  """
440
441
 
441
- agent = va.agent.VisionAgentCoder()
442
+ agent = va.agent.VisionAgentCoder(verbosity=int(VERBOSITY))
442
443
  if name not in artifacts:
443
444
  print(f"[Artifact {name} does not exist]")
444
445
  return f"[Artifact {name} does not exist]"
File without changes
File without changes