vision-agent 0.2.233__py3-none-any.whl → 0.2.234__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.
@@ -20,7 +20,7 @@ PLAN = """
20
20
  3. Only output <finalize_plan> when you are done planning and want to end the planning process. DO NOT output <finalize_plan> with <execute_python> tags, only after OBSERVATION's.
21
21
  4. Only load/save files from {media_list} unless you specifically saved the file previously.
22
22
  5. Ensure you always call `suggestion` initially and `get_tool_for_task` to get the right tool for the subtask.
23
- 6. Calling `plt.imshow` or `save_image` will display the image to you, use this to visually check your results.
23
+ 6. Calling `plt.imshow` or `save_image` will display the image to you so you can check your results. If you see an image after <execute_python> it's generated from your code.
24
24
  7. DO NOT hard code the answer into your code, it should be dynamic and work for any similar request.
25
25
  8. DO NOT over index on claude35_vqa, if tool output is close to claude35_vqa's output you do not need to improve the tool.
26
26
  9. You can only respond in the following format with a single <thinking>, <execute_python> or <finalize_plan> tag:
@@ -97,8 +97,7 @@ def run_planning(
97
97
  media_list: List[Union[str, Path]],
98
98
  model: LMM,
99
99
  ) -> str:
100
- # only keep last 10 messages for planning
101
- planning = get_planning(chat[-10:])
100
+ planning = get_planning(chat)
102
101
  prompt = PLAN.format(
103
102
  tool_desc=PLANNING_TOOLS_DOCSTRING,
104
103
  examples=f"{EXAMPLE_PLAN1}\n{EXAMPLE_PLAN2}",
@@ -372,7 +371,7 @@ def replace_interaction_with_obs(chat: List[AgentMessage]) -> List[AgentMessage]
372
371
  function_name = response["function_name"]
373
372
  tool_doc = get_tool_documentation(function_name)
374
373
  if "box_threshold" in response:
375
- tool_doc = f"Use the following function with box_threshold={response['box_threshold']}\n\n{tool_doc}"
374
+ tool_doc = f"Use the following function with box_threshold={response['box_threshold']}. This tool and its parameters were chosen by the user so do not change them in your planning.\n\n{tool_doc}."
376
375
  new_chat.append(AgentMessage(role="observation", content=tool_doc))
377
376
  except (json.JSONDecodeError, KeyError):
378
377
  raise ValueError(f"Invalid JSON in interaction response: {chat_i}")
@@ -91,8 +91,6 @@ def maybe_run_action(
91
91
  code_interpreter: Optional[CodeInterpreter] = None,
92
92
  ) -> Optional[List[AgentMessage]]:
93
93
  extracted_chat, final_code = extract_conversation(chat)
94
- # only keep last 5 messages to keep context recent and not overwhelm LLM
95
- extracted_chat = extracted_chat[-5:]
96
94
  if action == "generate_or_edit_vision_code":
97
95
  # there's an issue here because coder.generate_code will send it's code_context
98
96
  # to the outside user via it's update_callback, but we don't necessarily have
@@ -125,6 +123,7 @@ def maybe_run_action(
125
123
  ],
126
124
  code="",
127
125
  )
126
+
128
127
  context = coder.generate_code_from_plan(
129
128
  extracted_chat, plan_context, code_interpreter=code_interpreter
130
129
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vision-agent
3
- Version: 0.2.233
3
+ Version: 0.2.234
4
4
  Summary: Toolset for Vision Agent
5
5
  Author: Landing AI
6
6
  Author-email: dev@landing.ai
@@ -13,11 +13,11 @@ vision_agent/agent/vision_agent_coder_prompts_v2.py,sha256=NUMWq-Lxq5JmmyWs3C5O_
13
13
  vision_agent/agent/vision_agent_coder_v2.py,sha256=yQYcO0s4BI9pWaAQQAVtkwWa3UF5w0iLKvwpeJ6iegM,17077
14
14
  vision_agent/agent/vision_agent_planner.py,sha256=fFzjNkZBKkh8Y_oS06ATI4qz31xmIJvixb_tV1kX8KA,18590
15
15
  vision_agent/agent/vision_agent_planner_prompts.py,sha256=rYRdJthc-sQN57VgCBKrF09Sd73BSxcBdjNe6C4WNZ8,6837
16
- vision_agent/agent/vision_agent_planner_prompts_v2.py,sha256=U88z1Y7CifFs7t53aUrl8qjWtBYs0f_F5vyg_0VYJko,35528
17
- vision_agent/agent/vision_agent_planner_v2.py,sha256=NUyi57zxCmOO004_cJcCCDa4UgcKSWB1WCGuyOhhXQE,20602
16
+ vision_agent/agent/vision_agent_planner_prompts_v2.py,sha256=JLiFZvwQFLYukgj4l-SzxSIjmJHTEkL2HSZbkjU529w,35591
17
+ vision_agent/agent/vision_agent_planner_v2.py,sha256=wISmdTN-W1pjgZg3_aneGowI3lRQRHTSbpyeTJ79O5A,20645
18
18
  vision_agent/agent/vision_agent_prompts.py,sha256=KaJwYPUP7_GvQsCPPs6Fdawmi3AQWmWajBUuzj7gTG4,13812
19
19
  vision_agent/agent/vision_agent_prompts_v2.py,sha256=Wyxa15NOe75PefAfw3_RRwvgjg8YVqCrU7WvvWoYJpk,2733
20
- vision_agent/agent/vision_agent_v2.py,sha256=86_pPdkkMBk08TTFZ7zu9QG37Iz9uI8Nmt79wwm_EIA,11053
20
+ vision_agent/agent/vision_agent_v2.py,sha256=Q96YsLovCUOd6m2Cg7EGCiHshDq65vxHsfVj7IToyls,10936
21
21
  vision_agent/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  vision_agent/clients/http.py,sha256=k883i6M_4nl7zwwHSI-yP5sAgQZIDPM1nrKD6YFJ3Xs,2009
23
23
  vision_agent/clients/landing_public_api.py,sha256=lU2ev6E8NICmR8DMUljuGcVFy5VNJQ4WQkWC8WnnJEc,1503
@@ -46,7 +46,7 @@ vision_agent/utils/sim.py,sha256=DYya76dYVtifFyXilMLxBzGgyfyeqhEwU4RJ4894lCI,979
46
46
  vision_agent/utils/type_defs.py,sha256=BE12s3JNQy36QvauXHjwyeffVh5enfcvd4vTzSwvEZI,1384
47
47
  vision_agent/utils/video.py,sha256=e1VwKhXzzlC5LcFMyrcQYrPnpnX4wxDpnQ-76sB4jgM,6001
48
48
  vision_agent/utils/video_tracking.py,sha256=wK5dOutqV2t2aeaxedstCBa7xy-NNQE0-QZqKu1QUds,9498
49
- vision_agent-0.2.233.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
50
- vision_agent-0.2.233.dist-info/METADATA,sha256=EoNuerRth0lHRC7TK2Xh7w6V__YtUJraKk9yN8AMx2U,5760
51
- vision_agent-0.2.233.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
52
- vision_agent-0.2.233.dist-info/RECORD,,
49
+ vision_agent-0.2.234.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
50
+ vision_agent-0.2.234.dist-info/METADATA,sha256=HE_nkLFPBpXjw0zU3A0K3c-c6jt3qsdZvT9FhQy0bw8,5760
51
+ vision_agent-0.2.234.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
52
+ vision_agent-0.2.234.dist-info/RECORD,,