vision-agent 0.2.29__py3-none-any.whl → 0.2.30__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.
@@ -1,6 +1,6 @@
1
1
  from abc import ABC, abstractmethod
2
2
  from pathlib import Path
3
- from typing import Dict, List, Optional, Union, Any
3
+ from typing import Any, Dict, List, Optional, Union
4
4
 
5
5
 
6
6
  class Agent(ABC):
@@ -3,7 +3,7 @@ import logging
3
3
  import os
4
4
  import sys
5
5
  from pathlib import Path
6
- from typing import Dict, List, Optional, Union, Any
6
+ from typing import Any, Dict, List, Optional, Union
7
7
 
8
8
  from rich.console import Console
9
9
  from rich.syntax import Syntax
@@ -3,7 +3,7 @@ import json
3
3
  import logging
4
4
  import sys
5
5
  from pathlib import Path
6
- from typing import Any, Dict, List, Optional, Union, cast, Callable, no_type_check
6
+ from typing import Any, Callable, Dict, List, Optional, Union, cast, no_type_check
7
7
 
8
8
  from rich.console import Console
9
9
  from rich.syntax import Syntax
@@ -14,6 +14,7 @@ from vision_agent.agent.vision_agent_v3_prompts import (
14
14
  CODE,
15
15
  FEEDBACK,
16
16
  FIX_BUG,
17
+ FULL_TASK,
17
18
  PLAN,
18
19
  REFLECT,
19
20
  SIMPLE_TEST,
@@ -332,7 +333,7 @@ class VisionAgentV3(Agent):
332
333
  self.verbosity,
333
334
  )
334
335
  results = write_and_test_code(
335
- plan_i_str,
336
+ FULL_TASK.format(user_request=chat[0]["content"], subtasks=plan_i_str),
336
337
  tool_info,
337
338
  UTILITIES_DOCSTRING,
338
339
  format_memory(working_memory),
@@ -350,7 +351,14 @@ class VisionAgentV3(Agent):
350
351
  plan.append({"code": code, "test": test, "plan": plan_i})
351
352
 
352
353
  if self_reflection:
353
- reflection = reflect(chat, plan_i_str, code, self.planner)
354
+ reflection = reflect(
355
+ chat,
356
+ FULL_TASK.format(
357
+ user_request=chat[0]["content"], subtasks=plan_i_str
358
+ ),
359
+ code,
360
+ self.planner,
361
+ )
354
362
  if self.verbosity > 0:
355
363
  self.log_progress(
356
364
  {
@@ -3,6 +3,14 @@ USER_REQ = """
3
3
  {user_request}
4
4
  """
5
5
 
6
+ FULL_TASK = """
7
+ ## User Request
8
+ {user_request}
9
+
10
+ ## Subtasks
11
+ {subtasks}
12
+ """
13
+
6
14
  FEEDBACK = """
7
15
  ## This contains code and feedback from previous runs and is used for providing context so you do not make the same mistake again.
8
16
 
@@ -170,7 +178,7 @@ This is the documentation for the functions you have access to. You may call any
170
178
 
171
179
 
172
180
  FIX_BUG = """
173
- **Role** As a coder, your job is to find the error in the code and fix it. You are running in a notebook setting so feel free to run !pip install to install missing packages.
181
+ **Role** As a coder, your job is to find the error in the code and fix it. You are running in a notebook setting so you can run !pip install to install missing packages.
174
182
 
175
183
  **Instructions**:
176
184
  Please re-complete the code to fix the error message. Here is the previous version:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vision-agent
3
- Version: 0.2.29
3
+ Version: 0.2.30
4
4
  Summary: Toolset for Vision Agent
5
5
  Author: Landing AI
6
6
  Author-email: dev@landing.ai
@@ -1,7 +1,7 @@
1
1
  vision_agent/__init__.py,sha256=GVLHCeK_R-zgldpbcPmOzJat-BkadvkuRCMxDvTIcXs,108
2
2
  vision_agent/agent/__init__.py,sha256=jpmL6z5e4PFfQM21JbSsRwcERRXn58XFmURAMwWeoRM,249
3
- vision_agent/agent/agent.py,sha256=-HblUCrTZdxsP-MlSBzSfCTm5vELLnfb40l2L-bkVHw,538
4
- vision_agent/agent/agent_coder.py,sha256=d4N0I7QMKOdGoI-0ZRQ3Fp2QusAHbbJNe8AXg1IyRk4,7006
3
+ vision_agent/agent/agent.py,sha256=4buKL_7PA6q_Ktlf26FxfX0JxRGrL-swYk0xJuYNVz4,538
4
+ vision_agent/agent/agent_coder.py,sha256=4Neo6qM9-J8sJ-PKqSaUHr28SYm43IjEvhDK8BfDosE,7006
5
5
  vision_agent/agent/agent_coder_prompts.py,sha256=CJe3v7xvHQ32u3RQAXQga_Tk_4UgU64RBAMHZ3S70KY,5538
6
6
  vision_agent/agent/easytool.py,sha256=oMHnBg7YBtIPgqQUNcZgq7uMgpPThs99_UnO7ERkMVg,11511
7
7
  vision_agent/agent/easytool_prompts.py,sha256=Bikw-PPLkm78dwywTlnv32Y1Tw6JMeC-R7oCnXWLcTk,4656
@@ -11,8 +11,8 @@ vision_agent/agent/vision_agent.py,sha256=Rs7O0PXc2J9FlrpBa3UGs5NjqQT51Y507klQf9
11
11
  vision_agent/agent/vision_agent_prompts.py,sha256=MZSIwovYgB-f-kdJ6btaNDVXptJn47bfOL3-Zn6NiC0,8573
12
12
  vision_agent/agent/vision_agent_v2.py,sha256=t2D1mMUYEv1dFeMrkEUVbDEdArunb7F1ZeYB8qijU2w,15109
13
13
  vision_agent/agent/vision_agent_v2_prompts.py,sha256=b_0BMq6GrbGfl09MHrv4mj-mqyE1FxMl3Xq44qD4S1E,6161
14
- vision_agent/agent/vision_agent_v3.py,sha256=MbczVWVaTY6d8OGJl5cQpX55AvfP5d_5F1YBqC29sR8,12123
15
- vision_agent/agent/vision_agent_v3_prompts.py,sha256=ApubrCj72R7sBsRo43WVnckMVj-vqGxcMkSrC9kF8bM,7999
14
+ vision_agent/agent/vision_agent_v3.py,sha256=jPU__NueKQwFzIoJd0zzg6z9q7IDQa9QPaxt8Qlca98,12403
15
+ vision_agent/agent/vision_agent_v3_prompts.py,sha256=ejedMNDluVYZjHOIXKN98LzX-pOHin2DJhCyZUWULNE,8070
16
16
  vision_agent/fonts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  vision_agent/fonts/default_font_ch_en.ttf,sha256=1YM0Z3XqLDjSNbF7ihQFSAIUdjF9m1rtHiNC_6QosTE,1594400
18
18
  vision_agent/llm/__init__.py,sha256=BoUm_zSAKnLlE8s-gKTSQugXDqVZKPqYlWwlTLdhcz4,48
@@ -30,7 +30,7 @@ vision_agent/utils/image_utils.py,sha256=_cdiS5YrLzqkq_ZgFUO897m5M4_SCIThwUy4lOk
30
30
  vision_agent/utils/sim.py,sha256=oUZ-6eu8Io-UNt9GXJ0XRKtP-Wc0sPWVzYGVpB2yDFk,3001
31
31
  vision_agent/utils/type_defs.py,sha256=BlI8ywWHAplC7kYWLvt4AOdnKpEW3qWEFm-GEOSkrFQ,1792
32
32
  vision_agent/utils/video.py,sha256=xTElFSFp1Jw4ulOMnk81Vxsh-9dTxcWUO6P9fzEi3AM,7653
33
- vision_agent-0.2.29.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
34
- vision_agent-0.2.29.dist-info/METADATA,sha256=WK1rUZk9YdAglrze7ubf4_dx0ipyBRAb980-a_uabLc,9212
35
- vision_agent-0.2.29.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
36
- vision_agent-0.2.29.dist-info/RECORD,,
33
+ vision_agent-0.2.30.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
34
+ vision_agent-0.2.30.dist-info/METADATA,sha256=uVj7XfG4Hat1Bed9FYM2dipIseooN4AHY-Tl4rSPOIg,9212
35
+ vision_agent-0.2.30.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
36
+ vision_agent-0.2.30.dist-info/RECORD,,