PraisonAI 0.1.8__cp312-cp312-manylinux_2_35_x86_64.whl → 0.1.10__cp312-cp312-manylinux_2_35_x86_64.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 PraisonAI might be problematic. Click here for more details.
- praisonai/agents_generator.py +13 -2
- praisonai/cli.py +16 -3
- praisonai/deploy.py +1 -1
- {praisonai-0.1.8.dist-info → praisonai-0.1.10.dist-info}/METADATA +1 -1
- {praisonai-0.1.8.dist-info → praisonai-0.1.10.dist-info}/RECORD +8 -8
- {praisonai-0.1.8.dist-info → praisonai-0.1.10.dist-info}/LICENSE +0 -0
- {praisonai-0.1.8.dist-info → praisonai-0.1.10.dist-info}/WHEEL +0 -0
- {praisonai-0.1.8.dist-info → praisonai-0.1.10.dist-info}/entry_points.txt +0 -0
praisonai/agents_generator.py
CHANGED
|
@@ -47,7 +47,7 @@ def disable_crewai_telemetry():
|
|
|
47
47
|
disable_crewai_telemetry()
|
|
48
48
|
|
|
49
49
|
class AgentsGenerator:
|
|
50
|
-
def __init__(self, agent_file, framework, config_list, log_level=None, agent_callback=None, task_callback=None, agent_yaml=None):
|
|
50
|
+
def __init__(self, agent_file, framework, config_list, log_level=None, agent_callback=None, task_callback=None, agent_yaml=None, tools=None):
|
|
51
51
|
"""
|
|
52
52
|
Initialize the AgentsGenerator object.
|
|
53
53
|
|
|
@@ -59,6 +59,7 @@ class AgentsGenerator:
|
|
|
59
59
|
agent_callback (callable, optional): A callback function to be executed after each agent step.
|
|
60
60
|
task_callback (callable, optional): A callback function to be executed after each tool run.
|
|
61
61
|
agent_yaml (str, optional): The content of the YAML file. Defaults to None.
|
|
62
|
+
tools (dict, optional): A dictionary containing the tools to be used for the agents. Defaults to None.
|
|
62
63
|
|
|
63
64
|
Attributes:
|
|
64
65
|
agent_file (str): The path to the agent file.
|
|
@@ -67,6 +68,7 @@ class AgentsGenerator:
|
|
|
67
68
|
log_level (int): The logging level to use.
|
|
68
69
|
agent_callback (callable, optional): A callback function to be executed after each agent step.
|
|
69
70
|
task_callback (callable, optional): A callback function to be executed after each tool run.
|
|
71
|
+
tools (dict): A dictionary containing the tools to be used for the agents.
|
|
70
72
|
"""
|
|
71
73
|
self.agent_file = agent_file
|
|
72
74
|
self.framework = framework
|
|
@@ -75,6 +77,7 @@ class AgentsGenerator:
|
|
|
75
77
|
self.agent_callback = agent_callback
|
|
76
78
|
self.task_callback = task_callback
|
|
77
79
|
self.agent_yaml = agent_yaml
|
|
80
|
+
self.tools = tools or [] # Store tool class names as a list
|
|
78
81
|
self.log_level = log_level or logging.getLogger().getEffectiveLevel()
|
|
79
82
|
if self.log_level == logging.NOTSET:
|
|
80
83
|
self.log_level = os.environ.get('LOGLEVEL', 'INFO').upper()
|
|
@@ -207,6 +210,14 @@ class AgentsGenerator:
|
|
|
207
210
|
'YoutubeChannelSearchTool': YoutubeChannelSearchTool(),
|
|
208
211
|
'YoutubeVideoSearchTool': YoutubeVideoSearchTool(),
|
|
209
212
|
}
|
|
213
|
+
|
|
214
|
+
# Add tools from class names
|
|
215
|
+
for tool_class in self.tools:
|
|
216
|
+
if isinstance(tool_class, type) and issubclass(tool_class, BaseTool):
|
|
217
|
+
tool_name = tool_class.__name__
|
|
218
|
+
tools_dict[tool_name] = tool_class()
|
|
219
|
+
self.logger.debug(f"Added tool: {tool_name}")
|
|
220
|
+
|
|
210
221
|
root_directory = os.getcwd()
|
|
211
222
|
tools_py_path = os.path.join(root_directory, 'tools.py')
|
|
212
223
|
tools_dir_path = Path(root_directory) / 'tools'
|
|
@@ -288,7 +299,7 @@ class AgentsGenerator:
|
|
|
288
299
|
backstory_filled = details['backstory'].format(topic=topic)
|
|
289
300
|
|
|
290
301
|
# Adding tools to the agent if exists
|
|
291
|
-
agent_tools = [tools_dict
|
|
302
|
+
agent_tools = [tools_dict[tool] for tool in details.get('tools', []) if tool in tools_dict]
|
|
292
303
|
|
|
293
304
|
llm_model = details.get('llm') # Get the llm configuration
|
|
294
305
|
if llm_model:
|
praisonai/cli.py
CHANGED
|
@@ -67,7 +67,7 @@ def stream_subprocess(command, env=None):
|
|
|
67
67
|
raise subprocess.CalledProcessError(return_code, command)
|
|
68
68
|
|
|
69
69
|
class PraisonAI:
|
|
70
|
-
def __init__(self, agent_file="agents.yaml", framework="", auto=False, init=False, agent_yaml=None):
|
|
70
|
+
def __init__(self, agent_file="agents.yaml", framework="", auto=False, init=False, agent_yaml=None, tools=None):
|
|
71
71
|
"""
|
|
72
72
|
Initialize the PraisonAI object with default parameters.
|
|
73
73
|
|
|
@@ -97,6 +97,7 @@ class PraisonAI:
|
|
|
97
97
|
self.framework = framework
|
|
98
98
|
self.auto = auto
|
|
99
99
|
self.init = init
|
|
100
|
+
self.tools = tools or [] # Store tool class names as a list
|
|
100
101
|
|
|
101
102
|
def run(self):
|
|
102
103
|
"""
|
|
@@ -238,11 +239,23 @@ class PraisonAI:
|
|
|
238
239
|
self.create_chainlit_interface()
|
|
239
240
|
else:
|
|
240
241
|
# Modify below code to allow default ui
|
|
241
|
-
agents_generator = AgentsGenerator(
|
|
242
|
+
agents_generator = AgentsGenerator(
|
|
243
|
+
self.agent_file,
|
|
244
|
+
self.framework,
|
|
245
|
+
self.config_list,
|
|
246
|
+
agent_yaml=self.agent_yaml,
|
|
247
|
+
tools=self.tools # Pass tools to AgentsGenerator
|
|
248
|
+
)
|
|
242
249
|
result = agents_generator.generate_crew_and_kickoff()
|
|
243
250
|
return result
|
|
244
251
|
else:
|
|
245
|
-
agents_generator = AgentsGenerator(
|
|
252
|
+
agents_generator = AgentsGenerator(
|
|
253
|
+
self.agent_file,
|
|
254
|
+
self.framework,
|
|
255
|
+
self.config_list,
|
|
256
|
+
agent_yaml=self.agent_yaml,
|
|
257
|
+
tools=self.tools # Pass tools to AgentsGenerator
|
|
258
|
+
)
|
|
246
259
|
result = agents_generator.generate_crew_and_kickoff()
|
|
247
260
|
return result
|
|
248
261
|
|
praisonai/deploy.py
CHANGED
|
@@ -56,7 +56,7 @@ class CloudDeployer:
|
|
|
56
56
|
file.write("FROM python:3.11-slim\n")
|
|
57
57
|
file.write("WORKDIR /app\n")
|
|
58
58
|
file.write("COPY . .\n")
|
|
59
|
-
file.write("RUN pip install flask praisonai==0.1.
|
|
59
|
+
file.write("RUN pip install flask praisonai==0.1.10 gunicorn markdown\n")
|
|
60
60
|
file.write("EXPOSE 8080\n")
|
|
61
61
|
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
|
|
62
62
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.10
|
|
4
4
|
Summary: PraisonAI application combines AutoGen and CrewAI or similar frameworks into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customization, and efficient human-agent collaboration.
|
|
5
5
|
Author: Mervin Praison
|
|
6
6
|
Requires-Python: >=3.10,<3.13
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
praisonai/__init__.py,sha256=JrgyPlzZfLlozoW7SHZ1nVJ63rLPR3ki2k5ZPywYrnI,175
|
|
2
2
|
praisonai/__main__.py,sha256=MVgsjMThjBexHt4nhd760JCqvP4x0IQcwo8kULOK4FQ,144
|
|
3
|
-
praisonai/agents_generator.py,sha256=
|
|
3
|
+
praisonai/agents_generator.py,sha256=SNqjOT5bup9XVlpKnQ6orWqS3Q5LAC6V0t2OnxH0hnU,19748
|
|
4
4
|
praisonai/api/call.py,sha256=iHdAlgIH_oTsEbjaGGu1Jjo6DTfMR-SfFdtSxnOLCeY,11032
|
|
5
5
|
praisonai/auto.py,sha256=9spTXqj47Hmmqv5QHRYE_RzSVHH_KoPbaZjskUj2UcE,7895
|
|
6
6
|
praisonai/chainlit_ui.py,sha256=bNR7s509lp0I9JlJNvwCZRUZosC64qdvlFCt8NmFamQ,12216
|
|
7
|
-
praisonai/cli.py,sha256=
|
|
8
|
-
praisonai/deploy.py,sha256=
|
|
7
|
+
praisonai/cli.py,sha256=scEX17qKURlxXluGc3Sn8GBiaP5Q2QG8JLT7iifA17Y,21169
|
|
8
|
+
praisonai/deploy.py,sha256=ex7QNuSSluOctpi4KyvR5cXW0282Fcr35CoUp6bXpEQ,6028
|
|
9
9
|
praisonai/inbuilt_tools/__init__.py,sha256=mUKnbL6Gram9c9f2m8wJwEzURBLmPEOcHzwySBH89YA,74
|
|
10
10
|
praisonai/inbuilt_tools/autogen_tools.py,sha256=svYkM2N7DVFvbiwgoAS7U_MqTOD8rHf8VD3BaFUV5_Y,14907
|
|
11
11
|
praisonai/inc/__init__.py,sha256=sPDlYBBwdk0VlWzaaM_lG0_LD07lS2HRGvPdxXJFiYg,62
|
|
@@ -46,8 +46,8 @@ praisonai/ui/realtimeclient/realtimedocs.txt,sha256=hmgd8Uwy2SkjSndyyF_-ZOaNxiyH
|
|
|
46
46
|
praisonai/ui/realtimeclient/tools.py,sha256=IJOYwVOBW5Ocn5_iV9pFkmSKR3WU3YpX3kwF0I3jikQ,7855
|
|
47
47
|
praisonai/ui/sql_alchemy.py,sha256=kf025P_37C505YDDJZ-dPSmN_d62J2DCrkxbDAzXyrM,29884
|
|
48
48
|
praisonai/version.py,sha256=ugyuFliEqtAwQmH4sTlc16YXKYbFWDmfyk87fErB8-8,21
|
|
49
|
-
praisonai-0.1.
|
|
50
|
-
praisonai-0.1.
|
|
51
|
-
praisonai-0.1.
|
|
52
|
-
praisonai-0.1.
|
|
53
|
-
praisonai-0.1.
|
|
49
|
+
praisonai-0.1.10.dist-info/LICENSE,sha256=kqvFysVlnFxYOu0HxCe2HlmZmJtdmNGOxWRRkT9TsWc,1035
|
|
50
|
+
praisonai-0.1.10.dist-info/METADATA,sha256=3OyUMuBts_LDDJ5dDN3H327th0Gvp3cc7Re31-c-yhM,13292
|
|
51
|
+
praisonai-0.1.10.dist-info/WHEEL,sha256=Ie8mbC-etDUh6aDhzdvvvp_A-4mQQX7whlOFBnSJhcE,110
|
|
52
|
+
praisonai-0.1.10.dist-info/entry_points.txt,sha256=LT8Ie95dy4JkUlpgS0YyvD4Tf9zTstjaXISJnijDxoM,172
|
|
53
|
+
praisonai-0.1.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|