praisonaiagents 0.0.45__py3-none-any.whl → 0.0.46__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.
- praisonaiagents/__init__.py +0 -2
- praisonaiagents/agent/agent.py +11 -0
- praisonaiagents/agents/agents.py +11 -0
- praisonaiagents/memory/memory.py +1 -1
- praisonaiagents/task/task.py +11 -0
- {praisonaiagents-0.0.45.dist-info → praisonaiagents-0.0.46.dist-info}/METADATA +1 -1
- {praisonaiagents-0.0.45.dist-info → praisonaiagents-0.0.46.dist-info}/RECORD +9 -9
- {praisonaiagents-0.0.45.dist-info → praisonaiagents-0.0.46.dist-info}/WHEEL +0 -0
- {praisonaiagents-0.0.45.dist-info → praisonaiagents-0.0.46.dist-info}/top_level.txt +0 -0
praisonaiagents/__init__.py
CHANGED
@@ -9,7 +9,6 @@ from .tools.tools import Tools
|
|
9
9
|
from .agents.autoagents import AutoAgents
|
10
10
|
from .knowledge.knowledge import Knowledge
|
11
11
|
from .knowledge.chunking import Chunking
|
12
|
-
from .memory.memory import Memory
|
13
12
|
from .main import (
|
14
13
|
TaskOutput,
|
15
14
|
ReflectionOutput,
|
@@ -38,7 +37,6 @@ __all__ = [
|
|
38
37
|
'TaskOutput',
|
39
38
|
'ReflectionOutput',
|
40
39
|
'AutoAgents',
|
41
|
-
'Memory',
|
42
40
|
'display_interaction',
|
43
41
|
'display_self_reflection',
|
44
42
|
'display_instruction',
|
praisonaiagents/agent/agent.py
CHANGED
@@ -192,6 +192,17 @@ class Agent:
|
|
192
192
|
reflect_llm: Optional[str] = None,
|
193
193
|
user_id: Optional[str] = None
|
194
194
|
):
|
195
|
+
# Add check at start if memory is requested
|
196
|
+
if memory is not None:
|
197
|
+
try:
|
198
|
+
from ..memory.memory import Memory
|
199
|
+
MEMORY_AVAILABLE = True
|
200
|
+
except ImportError:
|
201
|
+
raise ImportError(
|
202
|
+
"Memory features requested in Agent but memory dependencies not installed. "
|
203
|
+
"Please install with: pip install \"praisonaiagents[memory]\""
|
204
|
+
)
|
205
|
+
|
195
206
|
# Handle backward compatibility for required fields
|
196
207
|
if all(x is None for x in [name, role, goal, backstory, instructions]):
|
197
208
|
raise ValueError("At least one of name, role, goal, backstory, or instructions must be provided")
|
praisonaiagents/agents/agents.py
CHANGED
@@ -46,6 +46,17 @@ def process_video(video_path: str, seconds_per_frame=2):
|
|
46
46
|
|
47
47
|
class PraisonAIAgents:
|
48
48
|
def __init__(self, agents, tasks=None, verbose=0, completion_checker=None, max_retries=5, process="sequential", manager_llm=None, memory=False, memory_config=None, embedder=None, user_id=None, max_iter=10):
|
49
|
+
# Add check at the start if memory is requested
|
50
|
+
if memory:
|
51
|
+
try:
|
52
|
+
from ..memory.memory import Memory
|
53
|
+
MEMORY_AVAILABLE = True
|
54
|
+
except ImportError:
|
55
|
+
raise ImportError(
|
56
|
+
"Memory features requested but memory dependencies not installed. "
|
57
|
+
"Please install with: pip install \"praisonaiagents[memory]\""
|
58
|
+
)
|
59
|
+
|
49
60
|
if not agents:
|
50
61
|
raise ValueError("At least one agent must be provided")
|
51
62
|
|
praisonaiagents/memory/memory.py
CHANGED
praisonaiagents/task/task.py
CHANGED
@@ -40,6 +40,17 @@ class Task:
|
|
40
40
|
quality_check=True,
|
41
41
|
input_file: Optional[str] = None
|
42
42
|
):
|
43
|
+
# Add check if memory config is provided
|
44
|
+
if memory is not None or (config and config.get('memory_config')):
|
45
|
+
try:
|
46
|
+
from ..memory.memory import Memory
|
47
|
+
MEMORY_AVAILABLE = True
|
48
|
+
except ImportError:
|
49
|
+
raise ImportError(
|
50
|
+
"Memory features requested in Task but memory dependencies not installed. "
|
51
|
+
"Please install with: pip install \"praisonaiagents[memory]\""
|
52
|
+
)
|
53
|
+
|
43
54
|
self.input_file = input_file
|
44
55
|
self.id = str(uuid.uuid4()) if id is None else str(id)
|
45
56
|
self.name = name
|
@@ -1,18 +1,18 @@
|
|
1
|
-
praisonaiagents/__init__.py,sha256=
|
1
|
+
praisonaiagents/__init__.py,sha256=JtPibbmeFv3meIb3vkKjckB0p7m-Vqt2RYPwOH8P41k,1228
|
2
2
|
praisonaiagents/main.py,sha256=wcFooRmCY38wtkSNFt6-nhZafgrHotCZE0S6U8IWgUY,14093
|
3
3
|
praisonaiagents/agent/__init__.py,sha256=sKO8wGEXvtCrvV1e834r1Okv0XAqAxqZCqz6hKLiTvA,79
|
4
|
-
praisonaiagents/agent/agent.py,sha256=
|
4
|
+
praisonaiagents/agent/agent.py,sha256=0738lTpJzNcm0HlWLqv--q3CfklBJkRJcZ4twTBXtSQ,38293
|
5
5
|
praisonaiagents/agents/__init__.py,sha256=_1d6Pqyk9EoBSo7E68sKyd1jDRlN1vxvVIRpoMc0Jcw,168
|
6
|
-
praisonaiagents/agents/agents.py,sha256=
|
6
|
+
praisonaiagents/agents/agents.py,sha256=kGgL9IAHuatwOkBF-4mtSpLCLgiVHgWnMh1R2iqdKVg,35956
|
7
7
|
praisonaiagents/agents/autoagents.py,sha256=bjC2O5oZmoJItJXIMPTWc2lsp_AJC9tMiTQOal2hwPA,13532
|
8
8
|
praisonaiagents/knowledge/__init__.py,sha256=xL1Eh-a3xsHyIcU4foOWF-JdWYIYBALJH9bge0Ujuto,246
|
9
9
|
praisonaiagents/knowledge/chunking.py,sha256=FzoNY0q8MkvG4gADqk4JcRhmH3lcEHbRdonDgitQa30,6624
|
10
10
|
praisonaiagents/knowledge/knowledge.py,sha256=fQNREDiwdoisfIxJBLVkteXgq_8Gbypfc3UaZbxf5QY,13210
|
11
|
-
praisonaiagents/memory/memory.py,sha256=
|
11
|
+
praisonaiagents/memory/memory.py,sha256=I8dOTkrl1i-GgQbDcrFOsSruzJ7MiI6Ys37DK27wrUs,35537
|
12
12
|
praisonaiagents/process/__init__.py,sha256=lkYbL7Hn5a0ldvJtkdH23vfIIZLIcanK-65C0MwaorY,52
|
13
13
|
praisonaiagents/process/process.py,sha256=_1Nk37kOYakPaUWAJff86rP0ENyykXqMnhTp8E0efuE,30802
|
14
14
|
praisonaiagents/task/__init__.py,sha256=VL5hXVmyGjINb34AalxpBMl-YW9m5EDcRkMTKkSSl7c,80
|
15
|
-
praisonaiagents/task/task.py,sha256=
|
15
|
+
praisonaiagents/task/task.py,sha256=YKoUOyIBQflOSCO4nuSi6sL-s2-Awujjs44qNqiUETI,13582
|
16
16
|
praisonaiagents/tools/__init__.py,sha256=-0lV5n5cG54vYW6REjXIfuJnCLKnfQIDlXsySCaPB9s,7347
|
17
17
|
praisonaiagents/tools/arxiv_tools.py,sha256=1stb31zTjLTon4jCnpZG5de9rKc9QWgC0leLegvPXWo,10528
|
18
18
|
praisonaiagents/tools/calculator_tools.py,sha256=S1xPT74Geurvjm52QMMIG29zDXVEWJmM6nmyY7yF298,9571
|
@@ -33,7 +33,7 @@ praisonaiagents/tools/wikipedia_tools.py,sha256=pGko-f33wqXgxJTv8db7TbizY5XnzBQR
|
|
33
33
|
praisonaiagents/tools/xml_tools.py,sha256=iYTMBEk5l3L3ryQ1fkUnNVYK-Nnua2Kx2S0dxNMMs1A,17122
|
34
34
|
praisonaiagents/tools/yaml_tools.py,sha256=uogAZrhXV9O7xvspAtcTfpKSQYL2nlOTvCQXN94-G9A,14215
|
35
35
|
praisonaiagents/tools/yfinance_tools.py,sha256=s2PBj_1v7oQnOobo2fDbQBACEHl61ftG4beG6Z979ZE,8529
|
36
|
-
praisonaiagents-0.0.
|
37
|
-
praisonaiagents-0.0.
|
38
|
-
praisonaiagents-0.0.
|
39
|
-
praisonaiagents-0.0.
|
36
|
+
praisonaiagents-0.0.46.dist-info/METADATA,sha256=ZaFzUCxbw3uoF7jLfgeVymtirenVl2hwvd8ls579yMI,664
|
37
|
+
praisonaiagents-0.0.46.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
38
|
+
praisonaiagents-0.0.46.dist-info/top_level.txt,sha256=_HsRddrJ23iDx5TTqVUVvXG2HeHBL5voshncAMDGjtA,16
|
39
|
+
praisonaiagents-0.0.46.dist-info/RECORD,,
|
File without changes
|
File without changes
|