PraisonAI 2.0.61__cp313-cp313-manylinux_2_39_x86_64.whl → 2.0.62__cp313-cp313-manylinux_2_39_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/cli.py +68 -4
- praisonai/deploy.py +1 -1
- {praisonai-2.0.61.dist-info → praisonai-2.0.62.dist-info}/METADATA +1 -1
- {praisonai-2.0.61.dist-info → praisonai-2.0.62.dist-info}/RECORD +7 -7
- {praisonai-2.0.61.dist-info → praisonai-2.0.62.dist-info}/LICENSE +0 -0
- {praisonai-2.0.61.dist-info → praisonai-2.0.62.dist-info}/WHEEL +0 -0
- {praisonai-2.0.61.dist-info → praisonai-2.0.62.dist-info}/entry_points.txt +0 -0
praisonai/cli.py
CHANGED
|
@@ -148,8 +148,16 @@ class PraisonAI:
|
|
|
148
148
|
if args.command:
|
|
149
149
|
if args.command.startswith("tests.test"): # Argument used for testing purposes
|
|
150
150
|
print("test")
|
|
151
|
+
return "test"
|
|
151
152
|
else:
|
|
152
153
|
self.agent_file = args.command
|
|
154
|
+
elif hasattr(args, 'direct_prompt') and args.direct_prompt:
|
|
155
|
+
result = self.handle_direct_prompt(args.direct_prompt)
|
|
156
|
+
print(result)
|
|
157
|
+
return result
|
|
158
|
+
else:
|
|
159
|
+
# Default to agents.yaml if no command provided
|
|
160
|
+
self.agent_file = "agents.yaml"
|
|
153
161
|
|
|
154
162
|
if args.deploy:
|
|
155
163
|
from .deploy import CloudDeployer
|
|
@@ -285,12 +293,15 @@ class PraisonAI:
|
|
|
285
293
|
"""
|
|
286
294
|
Parse the command-line arguments for the PraisonAI CLI.
|
|
287
295
|
"""
|
|
296
|
+
# Define special commands
|
|
297
|
+
special_commands = ['chat', 'code', 'call', 'realtime', 'train', 'ui']
|
|
298
|
+
|
|
288
299
|
parser = argparse.ArgumentParser(prog="praisonai", description="praisonAI command-line interface")
|
|
289
300
|
parser.add_argument("--framework", choices=["crewai", "autogen", "praisonai"], help="Specify the framework")
|
|
290
301
|
parser.add_argument("--ui", choices=["chainlit", "gradio"], help="Specify the UI framework (gradio or chainlit).")
|
|
291
302
|
parser.add_argument("--auto", nargs=argparse.REMAINDER, help="Enable auto mode and pass arguments for it")
|
|
292
303
|
parser.add_argument("--init", nargs=argparse.REMAINDER, help="Initialize agents with optional topic")
|
|
293
|
-
parser.add_argument("command", nargs="?", help="Command to run")
|
|
304
|
+
parser.add_argument("command", nargs="?", help="Command to run or direct prompt")
|
|
294
305
|
parser.add_argument("--deploy", action="store_true", help="Deploy the application")
|
|
295
306
|
parser.add_argument("--model", type=str, help="Model name")
|
|
296
307
|
parser.add_argument("--hf", type=str, help="Hugging Face model name")
|
|
@@ -301,6 +312,7 @@ class PraisonAI:
|
|
|
301
312
|
parser.add_argument("--public", action="store_true", help="Use ngrok to expose the server publicly (only with --call)")
|
|
302
313
|
args, unknown_args = parser.parse_known_args()
|
|
303
314
|
|
|
315
|
+
# Handle special cases first
|
|
304
316
|
if unknown_args and unknown_args[0] == '-b' and unknown_args[1] == 'api:app':
|
|
305
317
|
args.command = 'agents.yaml'
|
|
306
318
|
if args.command == 'api:app' or args.command == '/app/api:app':
|
|
@@ -331,9 +343,7 @@ class PraisonAI:
|
|
|
331
343
|
call_module.main(call_args)
|
|
332
344
|
sys.exit(0)
|
|
333
345
|
|
|
334
|
-
# Handle special commands
|
|
335
|
-
special_commands = ['chat', 'code', 'call', 'realtime', 'train', 'ui']
|
|
336
|
-
|
|
346
|
+
# Handle special commands
|
|
337
347
|
if args.command in special_commands:
|
|
338
348
|
if args.command == 'chat':
|
|
339
349
|
if not CHAINLIT_AVAILABLE:
|
|
@@ -402,8 +412,62 @@ class PraisonAI:
|
|
|
402
412
|
print("pip install praisonaiagents # For PraisonAIAgents\n")
|
|
403
413
|
sys.exit(1)
|
|
404
414
|
|
|
415
|
+
# Handle direct prompt if command is not a special command or file
|
|
416
|
+
if args.command and not args.command.endswith('.yaml') and args.command not in special_commands:
|
|
417
|
+
args.direct_prompt = args.command
|
|
418
|
+
args.command = None
|
|
419
|
+
|
|
405
420
|
return args
|
|
406
421
|
|
|
422
|
+
def handle_direct_prompt(self, prompt):
|
|
423
|
+
"""
|
|
424
|
+
Handle direct prompt by creating a single agent and running it.
|
|
425
|
+
"""
|
|
426
|
+
if PRAISONAI_AVAILABLE:
|
|
427
|
+
agent = PraisonAgent(
|
|
428
|
+
name="DirectAgent",
|
|
429
|
+
role="Assistant",
|
|
430
|
+
goal="Complete the given task",
|
|
431
|
+
backstory="You are a helpful AI assistant"
|
|
432
|
+
)
|
|
433
|
+
agent.start(prompt)
|
|
434
|
+
return ""
|
|
435
|
+
elif CREWAI_AVAILABLE:
|
|
436
|
+
agent = Agent(
|
|
437
|
+
name="DirectAgent",
|
|
438
|
+
role="Assistant",
|
|
439
|
+
goal="Complete the given task",
|
|
440
|
+
backstory="You are a helpful AI assistant"
|
|
441
|
+
)
|
|
442
|
+
task = Task(
|
|
443
|
+
description=prompt,
|
|
444
|
+
agent=agent
|
|
445
|
+
)
|
|
446
|
+
crew = Crew(
|
|
447
|
+
agents=[agent],
|
|
448
|
+
tasks=[task]
|
|
449
|
+
)
|
|
450
|
+
return crew.kickoff()
|
|
451
|
+
elif AUTOGEN_AVAILABLE:
|
|
452
|
+
config_list = self.config_list
|
|
453
|
+
assistant = autogen.AssistantAgent(
|
|
454
|
+
name="DirectAgent",
|
|
455
|
+
llm_config={"config_list": config_list}
|
|
456
|
+
)
|
|
457
|
+
user_proxy = autogen.UserProxyAgent(
|
|
458
|
+
name="UserProxy",
|
|
459
|
+
code_execution_config={"work_dir": "coding"}
|
|
460
|
+
)
|
|
461
|
+
user_proxy.initiate_chat(assistant, message=prompt)
|
|
462
|
+
return "Task completed"
|
|
463
|
+
else:
|
|
464
|
+
print("[red]ERROR: No framework is installed. Please install at least one framework:[/red]")
|
|
465
|
+
print("\npip install \"praisonai\\[crewai]\" # For CrewAI")
|
|
466
|
+
print("pip install \"praisonai\\[autogen]\" # For AutoGen")
|
|
467
|
+
print("pip install \"praisonai\\[crewai,autogen]\" # For both frameworks\n")
|
|
468
|
+
print("pip install praisonaiagents # For PraisonAIAgents\n")
|
|
469
|
+
sys.exit(1)
|
|
470
|
+
|
|
407
471
|
def create_chainlit_chat_interface(self):
|
|
408
472
|
"""
|
|
409
473
|
Create a Chainlit interface for the chat application.
|
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==2.0.
|
|
59
|
+
file.write("RUN pip install flask praisonai==2.0.62 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.3
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.62
|
|
4
4
|
Summary: PraisonAI is an AI Agents Framework with Self Reflection. PraisonAI application combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration.
|
|
5
5
|
Author: Mervin Praison
|
|
6
6
|
Requires-Python: >=3.10,<3.13
|
|
@@ -4,8 +4,8 @@ praisonai/agents_generator.py,sha256=j8lYudAr3wlVBQLng3iYL6mfRqx2i9M6wlryxIVRzDA
|
|
|
4
4
|
praisonai/api/call.py,sha256=krOfTCZM_bdbsNuWQ1PijzCHECkDvEi9jIvvZaDQUUU,11035
|
|
5
5
|
praisonai/auto.py,sha256=uLDm8CU3L_3amZsd55yzf9RdBF1uW-BGSx7nl9ctNZ4,8680
|
|
6
6
|
praisonai/chainlit_ui.py,sha256=bNR7s509lp0I9JlJNvwCZRUZosC64qdvlFCt8NmFamQ,12216
|
|
7
|
-
praisonai/cli.py,sha256=
|
|
8
|
-
praisonai/deploy.py,sha256
|
|
7
|
+
praisonai/cli.py,sha256=T4fXYBNNbrP-d05tZyyaCFv5yk1l8m5Tdq29UkUozEo,24129
|
|
8
|
+
praisonai/deploy.py,sha256=-RfcWiORrXzvQulxuirz5_eNUWRp8DlZOiPU6_A2kZ4,6028
|
|
9
9
|
praisonai/inbuilt_tools/__init__.py,sha256=fai4ZJIKz7-iOnGZv5jJX0wmT77PKa4x2jqyaJddKFA,569
|
|
10
10
|
praisonai/inbuilt_tools/autogen_tools.py,sha256=kJdEv61BTYvdHOaURNEpBcWq8Rs-oC03loNFTIjT-ak,4687
|
|
11
11
|
praisonai/inc/__init__.py,sha256=sPDlYBBwdk0VlWzaaM_lG0_LD07lS2HRGvPdxXJFiYg,62
|
|
@@ -82,8 +82,8 @@ praisonai/ui/realtimeclient/tools.py,sha256=IJOYwVOBW5Ocn5_iV9pFkmSKR3WU3YpX3kwF
|
|
|
82
82
|
praisonai/ui/sql_alchemy.py,sha256=oekZOXlRGMJ2SuC-lmgMMIzAmvbMg2DWeGTSpOzbVBM,29674
|
|
83
83
|
praisonai/ui/tools.md,sha256=Ad3YH_ZCLMWlz3mDXllQnQ_S5l55LWqLdcZSh-EXrHI,3956
|
|
84
84
|
praisonai/version.py,sha256=ugyuFliEqtAwQmH4sTlc16YXKYbFWDmfyk87fErB8-8,21
|
|
85
|
-
praisonai-2.0.
|
|
86
|
-
praisonai-2.0.
|
|
87
|
-
praisonai-2.0.
|
|
88
|
-
praisonai-2.0.
|
|
89
|
-
praisonai-2.0.
|
|
85
|
+
praisonai-2.0.62.dist-info/LICENSE,sha256=kqvFysVlnFxYOu0HxCe2HlmZmJtdmNGOxWRRkT9TsWc,1035
|
|
86
|
+
praisonai-2.0.62.dist-info/METADATA,sha256=TARzV6EAJ7_dEkYMRcJ2vj2AQ7fpDXTGNe9vsMGHNZQ,21885
|
|
87
|
+
praisonai-2.0.62.dist-info/WHEEL,sha256=OiNztsphQWM3l0xJ9BHQRElMnxzHbt1M68r2N60f8T8,110
|
|
88
|
+
praisonai-2.0.62.dist-info/entry_points.txt,sha256=I_xc6a6MNTTfLxYmAxe0rgey0G-_hbY07oFW-ZDnkw4,135
|
|
89
|
+
praisonai-2.0.62.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|