camel-ai 0.2.72a0__py3-none-any.whl → 0.2.72a2__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.
Potentially problematic release.
This version of camel-ai might be problematic. Click here for more details.
- camel/__init__.py +1 -1
- camel/societies/workforce/prompts.py +15 -11
- camel/societies/workforce/single_agent_worker.py +2 -2
- camel/toolkits/terminal_toolkit.py +239 -16
- {camel_ai-0.2.72a0.dist-info → camel_ai-0.2.72a2.dist-info}/METADATA +1 -1
- {camel_ai-0.2.72a0.dist-info → camel_ai-0.2.72a2.dist-info}/RECORD +8 -8
- {camel_ai-0.2.72a0.dist-info → camel_ai-0.2.72a2.dist-info}/WHEEL +0 -0
- {camel_ai-0.2.72a0.dist-info → camel_ai-0.2.72a2.dist-info}/licenses/LICENSE +0 -0
camel/__init__.py
CHANGED
|
@@ -202,16 +202,20 @@ TASK_DECOMPOSE_PROMPT = r"""You need to decompose the given task into subtasks a
|
|
|
202
202
|
* **DO NOT** use relative references like "the first task," "the paper mentioned above," or "the result from the previous step."
|
|
203
203
|
* **DO** write explicit instructions. For example, instead of "Analyze the document," write "Analyze the document titled 'The Future of AI'." The system will automatically provide the necessary inputs (like the document itself) from previous steps.
|
|
204
204
|
|
|
205
|
-
|
|
205
|
+
2. **Define Clear Deliverables**: Each subtask must specify a clear, concrete deliverable. This tells the agent exactly what to produce and provides a clear "definition of done."
|
|
206
|
+
* **DO NOT** use vague verbs like "analyze," "look into," or "research" without defining the output.
|
|
207
|
+
* **DO** specify the format and content of the output. For example, instead of "Analyze the attached report," write "Summarize the key findings of the attached report in a 3-bullet-point list." Instead of "Find contacts," write "Extract all names and email addresses from the document and return them as a JSON list of objects, where each object has a 'name' and 'email' key."
|
|
208
|
+
|
|
209
|
+
3. **Strategic Grouping for Sequential Work**:
|
|
206
210
|
* If a series of steps must be done in order *and* can be handled by the same worker type, group them into a single subtask to maintain flow and minimize handoffs.
|
|
207
211
|
|
|
208
|
-
|
|
212
|
+
4. **Aggressive Parallelization**:
|
|
209
213
|
* **Across Different Worker Specializations**: If distinct phases of the overall task require different types of workers (e.g., research by a 'SearchAgent', then content creation by a 'DocumentAgent'), define these as separate subtasks.
|
|
210
214
|
* **Within a Single Phase (Data/Task Parallelism)**: If a phase involves repetitive operations on multiple items (e.g., processing 10 documents, fetching 5 web pages, analyzing 3 datasets):
|
|
211
215
|
* Decompose this into parallel subtasks, one for each item or a small batch of items.
|
|
212
216
|
* This applies even if the same type of worker handles these parallel subtasks. The goal is to leverage multiple available workers or allow concurrent processing.
|
|
213
217
|
|
|
214
|
-
|
|
218
|
+
5. **Subtask Design for Efficiency**:
|
|
215
219
|
* **Actionable and Well-Defined**: Each subtask should have a clear, achievable goal.
|
|
216
220
|
* **Balanced Granularity**: Make subtasks large enough to be meaningful but small enough to enable parallelism and quick feedback. Avoid overly large subtasks that hide parallel opportunities.
|
|
217
221
|
* **Consider Dependencies**: While you list tasks sequentially, think about the true dependencies. The workforce manager will handle execution based on these implied dependencies and worker availability.
|
|
@@ -229,10 +233,10 @@ These principles aim to reduce overall completion time by maximizing concurrent
|
|
|
229
233
|
* **Correct Decomposition**:
|
|
230
234
|
```xml
|
|
231
235
|
<tasks>
|
|
232
|
-
<task>Create a short blog post about the benefits of Python by researching key benefits, writing a 300-word article, and finding a suitable image.</task>
|
|
236
|
+
<task>Create a short blog post about the benefits of Python by researching key benefits, writing a 300-word article, and finding a suitable image. The final output should be a single string containing the 300-word article followed by the image URL.</task>
|
|
233
237
|
</tasks>
|
|
234
238
|
```
|
|
235
|
-
* **Reasoning**: All steps are sequential and can be handled by the same worker type (`Document Agent`). Grouping them into one subtask is efficient and maintains the workflow, following the "Strategic Grouping" principle.
|
|
239
|
+
* **Reasoning**: All steps are sequential and can be handled by the same worker type (`Document Agent`). Grouping them into one subtask is efficient and maintains the workflow, following the "Strategic Grouping" principle. **The deliverable is clearly defined as a single string.**
|
|
236
240
|
|
|
237
241
|
***
|
|
238
242
|
**Example 2: Parallel Task Across Different Workers**
|
|
@@ -245,14 +249,14 @@ These principles aim to reduce overall completion time by maximizing concurrent
|
|
|
245
249
|
* **Correct Decomposition**:
|
|
246
250
|
```xml
|
|
247
251
|
<tasks>
|
|
248
|
-
<task>Create a financial summary for Apple (AAPL) for Q2.</task>
|
|
249
|
-
<task>Create a financial summary for Google (GOOGL) for Q2.</task>
|
|
250
|
-
<task>Perform market sentiment analysis for Apple (AAPL) for Q2.</task>
|
|
251
|
-
<task>Perform market sentiment analysis for Google (GOOGL) for Q2.</task>
|
|
252
|
-
<task>Compile the provided financial summaries and market sentiment
|
|
252
|
+
<task>Create a 1-paragraph financial summary for Apple (AAPL) for Q2, covering revenue, net income, and EPS. The output must be a plain text paragraph.</task>
|
|
253
|
+
<task>Create a 1-paragraph financial summary for Google (GOOGL) for Q2, covering revenue, net income, and EPS. The output must be a plain text paragraph.</task>
|
|
254
|
+
<task>Perform a market sentiment analysis for Apple (AAPL) for Q2, returning a single sentiment score from -1 (very negative) to 1 (very positive). The output must be a single floating-point number.</task>
|
|
255
|
+
<task>Perform a market sentiment analysis for Google (GOOGL) for Q2, returning a single sentiment score from -1 (very negative) to 1 (very positive). The output must be a single floating-point number.</task>
|
|
256
|
+
<task>Compile the provided financial summaries and market sentiment scores for Apple (AAPL) and Google (GOOGL) into a single Q2 performance report. The report should be a markdown-formatted document.</task>
|
|
253
257
|
</tasks>
|
|
254
258
|
```
|
|
255
|
-
* **Reasoning**: The financial analysis and market research can be done in parallel for both companies. The final report depends on all previous steps. This decomposition leverages worker specialization and parallelism, following the "Aggressive Parallelization" principle.
|
|
259
|
+
* **Reasoning**: The financial analysis and market research can be done in parallel for both companies. The final report depends on all previous steps. This decomposition leverages worker specialization and parallelism, following the "Aggressive Parallelization" principle. **Each subtask has a clearly defined deliverable.**
|
|
256
260
|
***
|
|
257
261
|
|
|
258
262
|
**END OF EXAMPLES** - Now, apply these principles and examples to decompose the following task.
|
|
@@ -445,11 +445,11 @@ class SingleAgentWorker(Worker):
|
|
|
445
445
|
f"\n{color}{task_result.content}{Fore.RESET}\n======", # type: ignore[union-attr]
|
|
446
446
|
)
|
|
447
447
|
|
|
448
|
+
task.result = task_result.content # type: ignore[union-attr]
|
|
449
|
+
|
|
448
450
|
if task_result.failed: # type: ignore[union-attr]
|
|
449
451
|
return TaskState.FAILED
|
|
450
452
|
|
|
451
|
-
task.result = task_result.content # type: ignore[union-attr]
|
|
452
|
-
|
|
453
453
|
if is_task_result_insufficient(task):
|
|
454
454
|
print(
|
|
455
455
|
f"{Fore.RED}Task {task.id}: Content validation failed - "
|
|
@@ -16,6 +16,7 @@ import atexit
|
|
|
16
16
|
import os
|
|
17
17
|
import platform
|
|
18
18
|
import queue
|
|
19
|
+
import shutil
|
|
19
20
|
import subprocess
|
|
20
21
|
import sys
|
|
21
22
|
import threading
|
|
@@ -41,21 +42,25 @@ class TerminalToolkit(BaseToolkit):
|
|
|
41
42
|
|
|
42
43
|
Args:
|
|
43
44
|
timeout (Optional[float]): The timeout for terminal operations.
|
|
45
|
+
(default: :obj:`None`)
|
|
44
46
|
shell_sessions (Optional[Dict[str, Any]]): A dictionary to store
|
|
45
|
-
shell session information. If None
|
|
46
|
-
used. (default: :obj:`
|
|
47
|
-
|
|
48
|
-
If
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
shell session information. If :obj:`None`, an empty dictionary
|
|
48
|
+
will be used. (default: :obj:`None`)
|
|
49
|
+
working_directory (Optional[str]): The working directory for
|
|
50
|
+
operations. If not provided, it will be determined by the
|
|
51
|
+
`CAMEL_WORKDIR` environment variable (if set). If the
|
|
52
|
+
environment variable is not set, it defaults to `./workspace`. All
|
|
53
|
+
execution and write operations will be restricted to this
|
|
54
|
+
directory. Read operations can access paths outside this
|
|
55
|
+
directory. (default: :obj:`None`)
|
|
51
56
|
need_terminal (bool): Whether to create a terminal interface.
|
|
52
57
|
(default: :obj:`True`)
|
|
53
|
-
use_shell_mode (bool): Whether to use shell mode for command
|
|
54
|
-
(default: :obj:`True`)
|
|
58
|
+
use_shell_mode (bool): Whether to use shell mode for command
|
|
59
|
+
execution. (default: :obj:`True`)
|
|
55
60
|
clone_current_env (bool): Whether to clone the current Python
|
|
56
|
-
environment.(default: :obj:`False`)
|
|
57
|
-
safe_mode (bool): Whether to enable safe mode to restrict
|
|
58
|
-
(default: :obj:`True`)
|
|
61
|
+
environment. (default: :obj:`False`)
|
|
62
|
+
safe_mode (bool): Whether to enable safe mode to restrict
|
|
63
|
+
operations. (default: :obj:`True`)
|
|
59
64
|
|
|
60
65
|
Note:
|
|
61
66
|
Most functions are compatible with Unix-based systems (macOS, Linux).
|
|
@@ -67,7 +72,7 @@ class TerminalToolkit(BaseToolkit):
|
|
|
67
72
|
self,
|
|
68
73
|
timeout: Optional[float] = None,
|
|
69
74
|
shell_sessions: Optional[Dict[str, Any]] = None,
|
|
70
|
-
|
|
75
|
+
working_directory: Optional[str] = None,
|
|
71
76
|
need_terminal: bool = True,
|
|
72
77
|
use_shell_mode: bool = True,
|
|
73
78
|
clone_current_env: bool = False,
|
|
@@ -88,12 +93,22 @@ class TerminalToolkit(BaseToolkit):
|
|
|
88
93
|
|
|
89
94
|
self.python_executable = sys.executable
|
|
90
95
|
self.is_macos = platform.system() == 'Darwin'
|
|
96
|
+
self.initial_env_path = None
|
|
97
|
+
self.initial_env_prepared = False
|
|
91
98
|
|
|
92
99
|
atexit.register(self.__del__)
|
|
93
100
|
|
|
94
|
-
if
|
|
95
|
-
|
|
96
|
-
|
|
101
|
+
if working_directory:
|
|
102
|
+
self.working_dir = os.path.abspath(working_directory)
|
|
103
|
+
else:
|
|
104
|
+
camel_workdir = os.environ.get("CAMEL_WORKDIR")
|
|
105
|
+
if camel_workdir:
|
|
106
|
+
self.working_dir = os.path.abspath(camel_workdir)
|
|
107
|
+
else:
|
|
108
|
+
self.working_dir = os.path.abspath("./workspace")
|
|
109
|
+
|
|
110
|
+
if not os.path.exists(self.working_dir):
|
|
111
|
+
os.makedirs(self.working_dir, exist_ok=True)
|
|
97
112
|
self._update_terminal_output(
|
|
98
113
|
f"Working directory set to: {self.working_dir}\n"
|
|
99
114
|
)
|
|
@@ -108,6 +123,7 @@ class TerminalToolkit(BaseToolkit):
|
|
|
108
123
|
self._clone_current_environment()
|
|
109
124
|
else:
|
|
110
125
|
self.cloned_env_path = None
|
|
126
|
+
self._prepare_initial_environment()
|
|
111
127
|
|
|
112
128
|
if need_terminal:
|
|
113
129
|
if self.is_macos:
|
|
@@ -192,6 +208,187 @@ class TerminalToolkit(BaseToolkit):
|
|
|
192
208
|
)
|
|
193
209
|
logger.error(f"Failed to create environment: {e}")
|
|
194
210
|
|
|
211
|
+
def _is_uv_environment(self) -> bool:
|
|
212
|
+
r"""Detect whether the current Python runtime is managed by uv."""
|
|
213
|
+
return (
|
|
214
|
+
"UV_CACHE_DIR" in os.environ
|
|
215
|
+
or "uv" in sys.executable
|
|
216
|
+
or shutil.which("uv") is not None
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
def _prepare_initial_environment(self):
|
|
220
|
+
r"""Prepare initial environment with Python 3.10, pip, and other
|
|
221
|
+
essential tools.
|
|
222
|
+
"""
|
|
223
|
+
try:
|
|
224
|
+
self.initial_env_path = os.path.join(
|
|
225
|
+
self.working_dir, ".initial_env"
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
if os.path.exists(self.initial_env_path):
|
|
229
|
+
self._update_terminal_output(
|
|
230
|
+
f"Using existing initial environment"
|
|
231
|
+
f": {self.initial_env_path}\n"
|
|
232
|
+
)
|
|
233
|
+
self.initial_env_prepared = True
|
|
234
|
+
return
|
|
235
|
+
|
|
236
|
+
self._update_terminal_output(
|
|
237
|
+
f"Preparing initial environment at: {self.initial_env_path}\n"
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
# Create the initial environment directory
|
|
241
|
+
os.makedirs(self.initial_env_path, exist_ok=True)
|
|
242
|
+
|
|
243
|
+
# Check if we should use uv
|
|
244
|
+
if self._is_uv_environment():
|
|
245
|
+
self._setup_initial_env_with_uv()
|
|
246
|
+
else:
|
|
247
|
+
self._setup_initial_env_with_venv()
|
|
248
|
+
|
|
249
|
+
self.initial_env_prepared = True
|
|
250
|
+
self._update_terminal_output(
|
|
251
|
+
"Initial environment prepared successfully!\n"
|
|
252
|
+
)
|
|
253
|
+
|
|
254
|
+
except Exception as e:
|
|
255
|
+
self._update_terminal_output(
|
|
256
|
+
f"Failed to prepare initial environment: {e!s}\n"
|
|
257
|
+
)
|
|
258
|
+
logger.error(f"Failed to prepare initial environment: {e}")
|
|
259
|
+
|
|
260
|
+
def _setup_initial_env_with_uv(self):
|
|
261
|
+
r"""Set up initial environment using uv."""
|
|
262
|
+
try:
|
|
263
|
+
# Create virtual environment with Python 3.10 using uv
|
|
264
|
+
subprocess.run(
|
|
265
|
+
["uv", "venv", "--python", "3.10", self.initial_env_path],
|
|
266
|
+
check=True,
|
|
267
|
+
capture_output=True,
|
|
268
|
+
cwd=self.working_dir,
|
|
269
|
+
timeout=300,
|
|
270
|
+
)
|
|
271
|
+
|
|
272
|
+
# Get the python path from the new environment
|
|
273
|
+
if self.os_type == 'Windows':
|
|
274
|
+
python_path = os.path.join(
|
|
275
|
+
self.initial_env_path, "Scripts", "python.exe"
|
|
276
|
+
)
|
|
277
|
+
else:
|
|
278
|
+
python_path = os.path.join(
|
|
279
|
+
self.initial_env_path, "bin", "python"
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
# Install essential packages using uv
|
|
283
|
+
essential_packages = ["pip", "setuptools", "wheel"]
|
|
284
|
+
subprocess.run(
|
|
285
|
+
[
|
|
286
|
+
"uv",
|
|
287
|
+
"pip",
|
|
288
|
+
"install",
|
|
289
|
+
"--python",
|
|
290
|
+
python_path,
|
|
291
|
+
*essential_packages,
|
|
292
|
+
],
|
|
293
|
+
check=True,
|
|
294
|
+
capture_output=True,
|
|
295
|
+
cwd=self.working_dir,
|
|
296
|
+
timeout=300,
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
# Check if Node.js is available (but don't install it)
|
|
300
|
+
self._check_nodejs_availability()
|
|
301
|
+
|
|
302
|
+
self._update_terminal_output(
|
|
303
|
+
"[UV] Initial environment created with Python 3.10 "
|
|
304
|
+
"and essential packages\n"
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
except subprocess.CalledProcessError as e:
|
|
308
|
+
error_msg = e.stderr.decode() if e.stderr else str(e)
|
|
309
|
+
raise Exception(f"UV setup failed: {error_msg}")
|
|
310
|
+
except subprocess.TimeoutExpired:
|
|
311
|
+
raise Exception("UV setup timed out after 5 minutes")
|
|
312
|
+
|
|
313
|
+
def _setup_initial_env_with_venv(self):
|
|
314
|
+
r"""Set up initial environment using standard venv."""
|
|
315
|
+
try:
|
|
316
|
+
# Create virtual environment with system Python
|
|
317
|
+
venv.create(
|
|
318
|
+
self.initial_env_path,
|
|
319
|
+
with_pip=True,
|
|
320
|
+
system_site_packages=False,
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
# Get pip path
|
|
324
|
+
if self.os_type == 'Windows':
|
|
325
|
+
pip_path = os.path.join(
|
|
326
|
+
self.initial_env_path, "Scripts", "pip.exe"
|
|
327
|
+
)
|
|
328
|
+
else:
|
|
329
|
+
pip_path = os.path.join(self.initial_env_path, "bin", "pip")
|
|
330
|
+
|
|
331
|
+
# Upgrade pip and install essential packages
|
|
332
|
+
essential_packages = ["pip", "setuptools", "wheel"]
|
|
333
|
+
subprocess.run(
|
|
334
|
+
[pip_path, "install", "--upgrade", *essential_packages],
|
|
335
|
+
check=True,
|
|
336
|
+
capture_output=True,
|
|
337
|
+
cwd=self.working_dir,
|
|
338
|
+
timeout=300,
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
# Check if Node.js is available (but don't install it)
|
|
342
|
+
self._check_nodejs_availability()
|
|
343
|
+
|
|
344
|
+
self._update_terminal_output(
|
|
345
|
+
"Initial environment created with system Python and "
|
|
346
|
+
"essential packages\n"
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
except subprocess.CalledProcessError as e:
|
|
350
|
+
error_msg = e.stderr.decode() if e.stderr else str(e)
|
|
351
|
+
raise Exception(f"Venv setup failed: {error_msg}")
|
|
352
|
+
except subprocess.TimeoutExpired:
|
|
353
|
+
raise Exception("Venv setup timed out after 5 minutes")
|
|
354
|
+
|
|
355
|
+
def _check_nodejs_availability(self):
|
|
356
|
+
r"""Check if Node.js is available without modifying the system."""
|
|
357
|
+
try:
|
|
358
|
+
# Check if Node.js is already available in the system
|
|
359
|
+
node_result = subprocess.run(
|
|
360
|
+
["node", "--version"],
|
|
361
|
+
check=False,
|
|
362
|
+
capture_output=True,
|
|
363
|
+
timeout=10,
|
|
364
|
+
)
|
|
365
|
+
|
|
366
|
+
npm_result = subprocess.run(
|
|
367
|
+
["npm", "--version"],
|
|
368
|
+
check=False,
|
|
369
|
+
capture_output=True,
|
|
370
|
+
timeout=10,
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
if node_result.returncode == 0 and npm_result.returncode == 0:
|
|
374
|
+
node_version = node_result.stdout.decode().strip()
|
|
375
|
+
npm_version = npm_result.stdout.decode().strip()
|
|
376
|
+
self._update_terminal_output(
|
|
377
|
+
f"Node.js {node_version} and npm {npm_version} "
|
|
378
|
+
"are available\n"
|
|
379
|
+
)
|
|
380
|
+
else:
|
|
381
|
+
self._update_terminal_output(
|
|
382
|
+
"Note: Node.js not found. If needed, please install it "
|
|
383
|
+
"manually.\n"
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
except Exception as e:
|
|
387
|
+
self._update_terminal_output(
|
|
388
|
+
f"Note: Could not check Node.js availability - {e}.\n"
|
|
389
|
+
)
|
|
390
|
+
logger.warning(f"Failed to check Node.js: {e}")
|
|
391
|
+
|
|
195
392
|
def _create_terminal(self):
|
|
196
393
|
r"""Create a terminal GUI. If GUI creation fails, fallback
|
|
197
394
|
to file output."""
|
|
@@ -722,6 +919,7 @@ class TerminalToolkit(BaseToolkit):
|
|
|
722
919
|
|
|
723
920
|
if command.startswith('python') or command.startswith('pip'):
|
|
724
921
|
if self.cloned_env_path:
|
|
922
|
+
# Use cloned environment
|
|
725
923
|
if self.os_type == 'Windows':
|
|
726
924
|
base_path = os.path.join(
|
|
727
925
|
self.cloned_env_path, "Scripts"
|
|
@@ -732,7 +930,20 @@ class TerminalToolkit(BaseToolkit):
|
|
|
732
930
|
base_path = os.path.join(self.cloned_env_path, "bin")
|
|
733
931
|
python_path = os.path.join(base_path, "python")
|
|
734
932
|
pip_path = os.path.join(base_path, "pip")
|
|
933
|
+
elif self.initial_env_prepared and self.initial_env_path:
|
|
934
|
+
# Use initial prepared environment
|
|
935
|
+
if self.os_type == 'Windows':
|
|
936
|
+
base_path = os.path.join(
|
|
937
|
+
self.initial_env_path, "Scripts"
|
|
938
|
+
)
|
|
939
|
+
python_path = os.path.join(base_path, "python.exe")
|
|
940
|
+
pip_path = os.path.join(base_path, "pip.exe")
|
|
941
|
+
else:
|
|
942
|
+
base_path = os.path.join(self.initial_env_path, "bin")
|
|
943
|
+
python_path = os.path.join(base_path, "python")
|
|
944
|
+
pip_path = os.path.join(base_path, "pip")
|
|
735
945
|
else:
|
|
946
|
+
# Fall back to system Python
|
|
736
947
|
python_path = self.python_executable
|
|
737
948
|
pip_path = f'"{python_path}" -m pip'
|
|
738
949
|
|
|
@@ -1298,13 +1509,25 @@ class TerminalToolkit(BaseToolkit):
|
|
|
1298
1509
|
f"'{session_id}': {e}"
|
|
1299
1510
|
)
|
|
1300
1511
|
|
|
1301
|
-
#
|
|
1512
|
+
# Clean up file output if it exists
|
|
1302
1513
|
if hasattr(self, 'log_file') and self.is_macos:
|
|
1303
1514
|
try:
|
|
1304
1515
|
logger.info(f"Final terminal log saved to: {self.log_file}")
|
|
1305
1516
|
except Exception as e:
|
|
1306
1517
|
logger.error(f"Error logging file information: {e}")
|
|
1307
1518
|
|
|
1519
|
+
# Clean up initial environment if it exists
|
|
1520
|
+
if hasattr(self, 'initial_env_path') and self.initial_env_path:
|
|
1521
|
+
try:
|
|
1522
|
+
if os.path.exists(self.initial_env_path):
|
|
1523
|
+
shutil.rmtree(self.initial_env_path)
|
|
1524
|
+
logger.info(
|
|
1525
|
+
f"Cleaned up initial environment: "
|
|
1526
|
+
f"{self.initial_env_path}"
|
|
1527
|
+
)
|
|
1528
|
+
except Exception as e:
|
|
1529
|
+
logger.error(f"Error cleaning up initial environment: {e}")
|
|
1530
|
+
|
|
1308
1531
|
# Clean up GUI resources if they exist
|
|
1309
1532
|
if hasattr(self, 'root') and self.root:
|
|
1310
1533
|
try:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
camel/__init__.py,sha256=
|
|
1
|
+
camel/__init__.py,sha256=_mXhIpC52sRjb19FSEYMCMjlTnE6SsVFKIK4fiWKMOI,901
|
|
2
2
|
camel/generators.py,sha256=JRqj9_m1PF4qT6UtybzTQ-KBT9MJQt18OAAYvQ_fr2o,13844
|
|
3
3
|
camel/human.py,sha256=Xg8x1cS5KK4bQ1SDByiHZnzsRpvRP-KZViNvmu38xo4,5475
|
|
4
4
|
camel/logger.py,sha256=WgEwael_eT6D-lVAKHpKIpwXSTjvLbny5jbV1Ab8lnA,5760
|
|
@@ -273,9 +273,9 @@ camel/societies/babyagi_playing.py,sha256=KbTdpHfZ2V8AripVck0bNTOyF-RSaMPCRARz3D
|
|
|
273
273
|
camel/societies/role_playing.py,sha256=0XScr3WfxX1QOC71RhBLmrcS5y2c7DMQB_mAFOHU34M,31421
|
|
274
274
|
camel/societies/workforce/__init__.py,sha256=bkTI-PE-MSK9AQ2V2gR6cR2WY-R7Jqy_NmXRtAoqo8o,920
|
|
275
275
|
camel/societies/workforce/base.py,sha256=z2DmbTP5LL5-aCAAqglznQqCLfPmnyM5zD3w6jjtsb8,2175
|
|
276
|
-
camel/societies/workforce/prompts.py,sha256=
|
|
276
|
+
camel/societies/workforce/prompts.py,sha256=WhqfedVdRjkh3AXCfX8YhELvS706NFKxayw0gg-6yVk,17908
|
|
277
277
|
camel/societies/workforce/role_playing_worker.py,sha256=Zm89lZTlV0T3o9C-DJ0HAV68Iq2Kdg8QqJRWs1TV9_A,10320
|
|
278
|
-
camel/societies/workforce/single_agent_worker.py,sha256=
|
|
278
|
+
camel/societies/workforce/single_agent_worker.py,sha256=NpwUz7SpEL0E9HBXg_Zodmc272EbsTO-iwMaqE61tO4,19342
|
|
279
279
|
camel/societies/workforce/structured_output_handler.py,sha256=xr8szFN86hg3jQ825aEkJTjkSFQnTlbinVg4j1vZJVI,17870
|
|
280
280
|
camel/societies/workforce/task_channel.py,sha256=GWHaGQBpjTzdKbWoBYAQzzAiLKRKRXa6beqtc4cg-Is,7611
|
|
281
281
|
camel/societies/workforce/utils.py,sha256=THgNHSeZsNVnjTzQTur3qCJhi72MrDS8X2gPET174cI,8434
|
|
@@ -373,7 +373,7 @@ camel/toolkits/slack_toolkit.py,sha256=ZT6Ndlce2qjGsyZaNMfQ54nSEi7DOC9Ro7YqtK-u5
|
|
|
373
373
|
camel/toolkits/stripe_toolkit.py,sha256=07swo5znGTnorafC1uYLKB4NRcJIOPOx19J7tkpLYWk,10102
|
|
374
374
|
camel/toolkits/sympy_toolkit.py,sha256=BAQnI8EFJydNUpKQWXBdleQ1Cm-srDBhFlqp9V9pbPQ,33757
|
|
375
375
|
camel/toolkits/task_planning_toolkit.py,sha256=Ttw9fHae4omGC1SA-6uaeXVHJ1YkwiVloz_hO-fm1gw,4855
|
|
376
|
-
camel/toolkits/terminal_toolkit.py,sha256=
|
|
376
|
+
camel/toolkits/terminal_toolkit.py,sha256=_VvSk1iPDNeA8q_D-2ianDhFqaYljSYM6ynTrzMFm4A,59076
|
|
377
377
|
camel/toolkits/thinking_toolkit.py,sha256=nZYLvKWIx2BM1DYu69I9B5EISAG7aYcLYXKv9663BVk,8000
|
|
378
378
|
camel/toolkits/twitter_toolkit.py,sha256=Px4N8aUxUzy01LhGSWkdrC2JgwKkrY3cvxgMeJ2XYfU,15939
|
|
379
379
|
camel/toolkits/video_analysis_toolkit.py,sha256=Wh08MAVvs3PtgXN88Sk0TXYaGfVmQAol8FPCXMPPpIM,23375
|
|
@@ -446,7 +446,7 @@ camel/verifiers/math_verifier.py,sha256=tA1D4S0sm8nsWISevxSN0hvSVtIUpqmJhzqfbuMo
|
|
|
446
446
|
camel/verifiers/models.py,sha256=GdxYPr7UxNrR1577yW4kyroRcLGfd-H1GXgv8potDWU,2471
|
|
447
447
|
camel/verifiers/physics_verifier.py,sha256=c1grrRddcrVN7szkxhv2QirwY9viIRSITWeWFF5HmLs,30187
|
|
448
448
|
camel/verifiers/python_verifier.py,sha256=ogTz77wODfEcDN4tMVtiSkRQyoiZbHPY2fKybn59lHw,20558
|
|
449
|
-
camel_ai-0.2.
|
|
450
|
-
camel_ai-0.2.
|
|
451
|
-
camel_ai-0.2.
|
|
452
|
-
camel_ai-0.2.
|
|
449
|
+
camel_ai-0.2.72a2.dist-info/METADATA,sha256=DCvskziajpL3_f8dK9Nnh1AEAeX2AEGza114yFYimL0,49998
|
|
450
|
+
camel_ai-0.2.72a2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
451
|
+
camel_ai-0.2.72a2.dist-info/licenses/LICENSE,sha256=id0nB2my5kG0xXeimIu5zZrbHLS6EQvxvkKkzIHaT2k,11343
|
|
452
|
+
camel_ai-0.2.72a2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|