PraisonAI 2.0.65__cp313-cp313-manylinux_2_39_x86_64.whl → 2.0.67__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 CHANGED
@@ -25,7 +25,6 @@ CALL_MODULE_AVAILABLE = False
25
25
  CREWAI_AVAILABLE = False
26
26
  AUTOGEN_AVAILABLE = False
27
27
  PRAISONAI_AVAILABLE = False
28
- TRAIN_AVAILABLE = False
29
28
  try:
30
29
  # Create necessary directories and set CHAINLIT_APP_ROOT
31
30
  if "CHAINLIT_APP_ROOT" not in os.environ:
@@ -72,12 +71,6 @@ try:
72
71
  except ImportError:
73
72
  pass
74
73
 
75
- try:
76
- import accelerate
77
- TRAIN_AVAILABLE = True
78
- except ImportError:
79
- pass
80
-
81
74
  logging.basicConfig(level=os.environ.get('LOGLEVEL', 'INFO'), format='%(asctime)s - %(levelname)s - %(message)s')
82
75
  logging.getLogger('alembic').setLevel(logging.ERROR)
83
76
  logging.getLogger('gradio').setLevel(logging.ERROR)
@@ -399,13 +392,8 @@ class PraisonAI:
399
392
  sys.exit(0)
400
393
 
401
394
  elif args.command == 'train':
402
- if not TRAIN_AVAILABLE:
403
- print("[red]ERROR: Train feature is not installed. Install with:[/red]")
404
- print("\npip install \"praisonai[train]\"\n")
405
- sys.exit(1)
406
395
  package_root = os.path.dirname(os.path.abspath(__file__))
407
396
  config_yaml_destination = os.path.join(os.getcwd(), 'config.yaml')
408
-
409
397
 
410
398
  elif args.command == 'ui':
411
399
  if not CHAINLIT_AVAILABLE:
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.65 gunicorn markdown\n")
59
+ file.write("RUN pip install flask praisonai==2.0.67 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
 
praisonai/train.py CHANGED
@@ -312,26 +312,41 @@ class TrainModel:
312
312
 
313
313
  def prepare_modelfile_content(self):
314
314
  output_model = self.config["hf_model_name"]
315
+ # Determine stop tokens from config or infer based on model name
316
+ model_name = self.config["model_name"].lower()
317
+ if "phi" in model_name:
318
+ inferred_stop_tokens = ["<|end|>", "<|user|>", "<|assistant|>"]
319
+ elif "llava" in model_name:
320
+ inferred_stop_tokens = ["</s>", "USER:", "ASSSISTANT:"]
321
+ elif "mistral" in model_name:
322
+ inferred_stop_tokens = ["[INST]", "[/INST]"]
323
+ elif "qwen" in model_name:
324
+ inferred_stop_tokens = ["<|endoftext|>"]
325
+ elif "deepseek" in model_name:
326
+ inferred_stop_tokens = ["<|begin▁of▁sentence|>", "<|end▁of▁sentence|>", "<|User|>", "<|Assistant|>"]
327
+ else:
328
+ inferred_stop_tokens = ["<|start_header_id|>", "<|end_header_id|>", "<|eot_id|>"]
329
+ # Use stop_tokens from config if provided, otherwise use inferred
330
+ model_stop_tokens = self.config.get("stop_tokens", inferred_stop_tokens)
331
+
315
332
  gguf_path = f"{output_model}/unsloth.Q4_K_M.gguf"
316
333
  if not os.path.exists(gguf_path):
317
334
  self.model, self.hf_tokenizer = self.load_model()
318
335
  self.save_model_gguf()
336
+ stop_parameters = "\n".join([f'PARAMETER stop "{token}"' for token in model_stop_tokens])
319
337
  return f"""FROM {output_model}/unsloth.Q4_K_M.gguf
320
338
 
321
- TEMPLATE \"\"\"Below are some instructions that describe some tasks. Write responses that appropriately complete each request.{{{{ if .Prompt }}}}
339
+ TEMPLATE \"\"\"Below are some instructions that describe some tasks. Write responses that appropriately complete each request.{{{{ if .Prompt }}}}
322
340
 
323
- ### Instruction:
324
- {{{{ .Prompt }}}}
341
+ ### Instruction:
342
+ {{{{ .Prompt }}}}
325
343
 
326
- {{{{ end }}}}### Response:
327
- {{{{ .Response }}}}\"\"\"
344
+ {{{{ end }}}}### Response:
345
+ {{{{ .Response }}}}\"\"\"
346
+
347
+ {stop_parameters}
348
+ """
328
349
 
329
- PARAMETER stop ""
330
- PARAMETER stop ""
331
- PARAMETER stop ""
332
- PARAMETER stop ""
333
- PARAMETER stop "<|reserved_special_token_"
334
- """
335
350
 
336
351
  def create_and_push_ollama_model(self):
337
352
  modelfile_content = self.prepare_modelfile_content()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: PraisonAI
3
- Version: 2.0.65
3
+ Version: 2.0.67
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=C4MoIXaLHldRNYPqXpHPpD8DjJU2qUJqZMHzbem7te4,25254
8
- praisonai/deploy.py,sha256=VOFYtqPTNJ25WrgRTI8wAqlS2DL5SjJGNDZp8kEsan8,6028
7
+ praisonai/cli.py,sha256=wKf17OzAmDhCWXtP_HDF4UrULCiWV1CI5yTEtCPUi28,24898
8
+ praisonai/deploy.py,sha256=Txysvn5rP7d-pqpUoIvGGSJtFHeleQU1nbcUrSP5Hlc,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
@@ -33,7 +33,7 @@ praisonai/setup/setup_conda_env.py,sha256=4QiWrqgEObivzOMwfJgWaCPpUEpB68cQ6lFwVw
33
33
  praisonai/setup/setup_conda_env.sh,sha256=aD5Tb_T4UeVtJD5ibYTBB50YWCKh7INdiei2LN1fBig,4081
34
34
  praisonai/setup.py,sha256=0jHgKnIPCtBZiGYaYyTz3PzrJI6nBy55VXk2UctXlDo,373
35
35
  praisonai/test.py,sha256=OL-wesjA5JTohr8rtr6kWoaS4ImkJg2l0GXJ-dUUfRU,4090
36
- praisonai/train.py,sha256=m3-N2XWRernBWRg_xRr7bilxhq7WvFJYwxfvjROIjEw,15541
36
+ praisonai/train.py,sha256=5ZR3FAZELIwe8Fv2Rt4ID3bjVvuVQEd5fWZ-3n-KUpo,16534
37
37
  praisonai/ui/README.md,sha256=QG9yucvBieVjCjWFzu6hL9xNtYllkoqyJ_q1b0YYAco,1124
38
38
  praisonai/ui/agents.py,sha256=1qsWE2yCaQKhuc-1uLHdMfZJeOXzBtp4pe5q7bk2EuA,32813
39
39
  praisonai/ui/callbacks.py,sha256=V4_-GjxmjDFmugUZGfQHKtNSysx7rT6i1UblbM_8lIM,1968
@@ -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.65.dist-info/LICENSE,sha256=kqvFysVlnFxYOu0HxCe2HlmZmJtdmNGOxWRRkT9TsWc,1035
86
- praisonai-2.0.65.dist-info/METADATA,sha256=ynQM9tQOLA8E6kocdiTfj2RDLiEwqGwIthkWjM5vG9U,21942
87
- praisonai-2.0.65.dist-info/WHEEL,sha256=OiNztsphQWM3l0xJ9BHQRElMnxzHbt1M68r2N60f8T8,110
88
- praisonai-2.0.65.dist-info/entry_points.txt,sha256=I_xc6a6MNTTfLxYmAxe0rgey0G-_hbY07oFW-ZDnkw4,135
89
- praisonai-2.0.65.dist-info/RECORD,,
85
+ praisonai-2.0.67.dist-info/LICENSE,sha256=kqvFysVlnFxYOu0HxCe2HlmZmJtdmNGOxWRRkT9TsWc,1035
86
+ praisonai-2.0.67.dist-info/METADATA,sha256=Ocu8ITZ5PpCjQM23ILnYEnLqLukAGFIVMmhLzDmPvtI,21942
87
+ praisonai-2.0.67.dist-info/WHEEL,sha256=OiNztsphQWM3l0xJ9BHQRElMnxzHbt1M68r2N60f8T8,110
88
+ praisonai-2.0.67.dist-info/entry_points.txt,sha256=I_xc6a6MNTTfLxYmAxe0rgey0G-_hbY07oFW-ZDnkw4,135
89
+ praisonai-2.0.67.dist-info/RECORD,,