vision-agent 0.2.29__tar.gz → 0.2.30__tar.gz
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.
- {vision_agent-0.2.29 → vision_agent-0.2.30}/PKG-INFO +1 -1
- {vision_agent-0.2.29 → vision_agent-0.2.30}/pyproject.toml +1 -1
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/agent/agent.py +1 -1
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/agent/agent_coder.py +1 -1
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/agent/vision_agent_v3.py +11 -3
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/agent/vision_agent_v3_prompts.py +9 -1
- {vision_agent-0.2.29 → vision_agent-0.2.30}/LICENSE +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/README.md +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/__init__.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/agent/__init__.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/agent/agent_coder_prompts.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/agent/easytool.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/agent/easytool_prompts.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/agent/reflexion.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/agent/reflexion_prompts.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/agent/vision_agent.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/agent/vision_agent_prompts.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/agent/vision_agent_v2.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/agent/vision_agent_v2_prompts.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/fonts/__init__.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/fonts/default_font_ch_en.ttf +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/llm/__init__.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/llm/llm.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/lmm/__init__.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/lmm/lmm.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/tools/__init__.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/tools/prompts.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/tools/tool_utils.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/tools/tools.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/tools/tools_v2.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/utils/__init__.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/utils/execute.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/utils/image_utils.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/utils/sim.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/utils/type_defs.py +0 -0
- {vision_agent-0.2.29 → vision_agent-0.2.30}/vision_agent/utils/video.py +0 -0
@@ -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,
|
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(
|
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
|
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:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|