vision-agent 0.2.67__py3-none-any.whl → 0.2.68__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.
@@ -324,16 +324,28 @@ def debug_code(
324
324
  "status": "started",
325
325
  }
326
326
  )
327
- fixed_code_and_test = extract_json(
328
- debugger(
329
- FIX_BUG.format(
330
- code=code,
331
- tests=test,
332
- result="\n".join(result.text().splitlines()[-50:]),
333
- feedback=format_memory(working_memory + new_working_memory),
327
+
328
+ fixed_code_and_test = {"code": "", "test": "", "reflections": ""}
329
+ success = False
330
+ count = 0
331
+ while not success and count < 3:
332
+ try:
333
+ fixed_code_and_test = extract_json(
334
+ debugger(
335
+ FIX_BUG.format(
336
+ code=code,
337
+ tests=test,
338
+ result="\n".join(result.text().splitlines()[-50:]),
339
+ feedback=format_memory(working_memory + new_working_memory),
340
+ )
341
+ )
334
342
  )
335
- )
336
- )
343
+ success = True
344
+ except Exception as e:
345
+ _LOGGER.exception(f"Error while extracting JSON: {e}")
346
+
347
+ count += 1
348
+
337
349
  old_code = code
338
350
  old_test = test
339
351
 
@@ -425,12 +437,12 @@ def retrieve_tools(
425
437
  {
426
438
  "type": "tools",
427
439
  "status": "completed",
428
- "payload": tool_list,
440
+ "payload": {v["description"]: v for v in tool_list}.values(),
429
441
  }
430
442
  )
431
443
 
432
444
  if verbosity == 2:
433
- tool_desc_str = "\n".join(tool_desc)
445
+ tool_desc_str = "\n".join(set(tool_desc))
434
446
  _LOGGER.info(f"Tools Description:\n{tool_desc_str}")
435
447
  tool_info_set = set(tool_info)
436
448
  return "\n\n".join(tool_info_set)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vision-agent
3
- Version: 0.2.67
3
+ Version: 0.2.68
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=EAb4-f9iyuEYkBrX4ag1syM8Syx8118_t0R6_C34M9w,57
2
2
  vision_agent/agent/__init__.py,sha256=IUwfbPMcT8X_rnXMLmI8gJ4ltsHy_XSs9eLiKURJxeY,81
3
3
  vision_agent/agent/agent.py,sha256=ZK-5lOtd9-eD9aWcXssJpnOyvZuO7_5hAmnb-6sWVe8,569
4
- vision_agent/agent/vision_agent.py,sha256=HC63BP4jPiR4lJLEkKQ-zMV5C5JwjnuZvc7hVjjS2uk,25284
4
+ vision_agent/agent/vision_agent.py,sha256=iYSGSz-6P0fjAqRafpJMrVYBa0kX_3cw2CA-okEJ_WE,25710
5
5
  vision_agent/agent/vision_agent_prompts.py,sha256=jpGJjrxDrxZej5SSgsTEK1sSYttgkTiZqxZAU1jWfvk,8656
6
6
  vision_agent/fonts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  vision_agent/fonts/default_font_ch_en.ttf,sha256=1YM0Z3XqLDjSNbF7ihQFSAIUdjF9m1rtHiNC_6QosTE,1594400
@@ -17,7 +17,7 @@ vision_agent/utils/image_utils.py,sha256=_cdiS5YrLzqkq_ZgFUO897m5M4_SCIThwUy4lOk
17
17
  vision_agent/utils/sim.py,sha256=ci6Eta73dDgLP1Ajtknbgmf1g8aAvBHqlVQvBuLMKXQ,4427
18
18
  vision_agent/utils/type_defs.py,sha256=BlI8ywWHAplC7kYWLvt4AOdnKpEW3qWEFm-GEOSkrFQ,1792
19
19
  vision_agent/utils/video.py,sha256=rNmU9KEIkZB5-EztZNlUiKYN0mm_55A_2VGUM0QpqLA,8779
20
- vision_agent-0.2.67.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
21
- vision_agent-0.2.67.dist-info/METADATA,sha256=BZKENJv_iaNU-XDqc5z4Ygx7k2jR4_7BbIdGoJE3voA,8363
22
- vision_agent-0.2.67.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
23
- vision_agent-0.2.67.dist-info/RECORD,,
20
+ vision_agent-0.2.68.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
21
+ vision_agent-0.2.68.dist-info/METADATA,sha256=ucXpLXm0kRs1y2ewohUXMWCXxb9K5e8tudePwBE4LYE,8363
22
+ vision_agent-0.2.68.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
23
+ vision_agent-0.2.68.dist-info/RECORD,,