PraisonAI 0.0.59rc3__tar.gz → 0.0.59rc6__tar.gz
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-0.0.59rc3 → praisonai-0.0.59rc6}/PKG-INFO +1 -1
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/cli.py +33 -3
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/deploy.py +1 -1
- praisonai-0.0.59rc6/praisonai/setup/__init__.py +0 -0
- praisonai-0.0.59rc6/praisonai/setup/build.py +21 -0
- praisonai-0.0.59rc6/praisonai/setup/config.yaml +58 -0
- praisonai-0.0.59rc6/praisonai/setup/setup_conda_env.py +25 -0
- praisonai-0.0.59rc6/praisonai/setup/setup_conda_env.sh +72 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/pyproject.toml +2 -2
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/LICENSE +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/README.md +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/__init__.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/__main__.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/agents_generator.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/auto.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/chainlit_ui.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/inbuilt_tools/__init__.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/inbuilt_tools/autogen_tools.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/inc/__init__.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/inc/models.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/public/android-chrome-192x192.png +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/public/android-chrome-512x512.png +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/public/apple-touch-icon.png +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/public/fantasy.svg +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/public/favicon-16x16.png +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/public/favicon-32x32.png +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/public/favicon.ico +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/public/game.svg +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/public/logo_dark.png +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/public/logo_light.png +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/public/movie.svg +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/public/thriller.svg +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6/praisonai}/setup/post_install.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/test.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/train.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/ui/chat.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/ui/code.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/ui/context.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/ui/public/fantasy.svg +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/ui/public/game.svg +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/ui/public/logo_dark.png +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/ui/public/logo_light.png +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/ui/public/movie.svg +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/ui/public/thriller.svg +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/ui/sql_alchemy.py +0 -0
- {praisonai-0.0.59rc3 → praisonai-0.0.59rc6}/praisonai/version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.59rc6
|
|
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
|
|
@@ -100,12 +100,42 @@ class PraisonAI:
|
|
|
100
100
|
return
|
|
101
101
|
|
|
102
102
|
if args.agent_file == 'train':
|
|
103
|
+
import subprocess
|
|
104
|
+
package_root = os.path.dirname(os.path.abspath(__file__))
|
|
105
|
+
config_yaml_source = os.path.join(package_root, 'setup', 'config.yaml')
|
|
106
|
+
config_yaml_destination = os.path.join(os.getcwd(), 'config.yaml')
|
|
107
|
+
|
|
108
|
+
if not os.path.exists(config_yaml_destination):
|
|
109
|
+
try:
|
|
110
|
+
shutil.copyfile(config_yaml_source, config_yaml_destination)
|
|
111
|
+
print("config.yaml copied to the current directory.")
|
|
112
|
+
except FileExistsError:
|
|
113
|
+
print("config.yaml already exists in the current directory. Skipping copy.")
|
|
114
|
+
else:
|
|
115
|
+
print("config.yaml already exists in the current directory. Skipping copy.")
|
|
116
|
+
|
|
103
117
|
if 'init' in sys.argv:
|
|
104
|
-
from setup.setup_conda_env import main as setup_conda_main
|
|
118
|
+
from praisonai.setup.setup_conda_env import main as setup_conda_main
|
|
105
119
|
setup_conda_main()
|
|
106
|
-
|
|
120
|
+
print("All packages installed")
|
|
121
|
+
return
|
|
122
|
+
|
|
123
|
+
try:
|
|
124
|
+
result = subprocess.check_output(['conda', 'env', 'list'])
|
|
125
|
+
if 'unsloth_env' in result.decode('utf-8'):
|
|
126
|
+
print("Conda environment 'unsloth_env' found.")
|
|
127
|
+
else:
|
|
128
|
+
raise subprocess.CalledProcessError(1, 'grep')
|
|
129
|
+
except subprocess.CalledProcessError:
|
|
130
|
+
print("Conda environment 'unsloth_env' not found. Setting it up...")
|
|
131
|
+
from praisonai.setup.setup_conda_env import main as setup_conda_main
|
|
132
|
+
setup_conda_main()
|
|
133
|
+
print("All packages installed.")
|
|
134
|
+
|
|
135
|
+
|
|
107
136
|
train_args = sys.argv[2:] # Get all arguments after 'train'
|
|
108
|
-
|
|
137
|
+
train_script_path = os.path.join(package_root, 'train.py')
|
|
138
|
+
subprocess.check_call(['conda', 'run', '--name', 'unsloth_env', 'python', train_script_path])
|
|
109
139
|
return
|
|
110
140
|
|
|
111
141
|
invocation_cmd = "praisonai"
|
|
@@ -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.0.
|
|
59
|
+
file.write("RUN pip install flask praisonai==0.0.59rc6 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
|
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
import sys
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
def build(setup_kwargs):
|
|
6
|
+
try:
|
|
7
|
+
# Get the directory of the current script
|
|
8
|
+
script_dir = os.path.dirname(os.path.abspath(__file__))
|
|
9
|
+
|
|
10
|
+
# Construct the path to post_install.py
|
|
11
|
+
post_install_script = os.path.join(script_dir, 'post_install.py')
|
|
12
|
+
|
|
13
|
+
# Run the post_install.py script
|
|
14
|
+
subprocess.check_call([sys.executable, post_install_script])
|
|
15
|
+
except subprocess.CalledProcessError as e:
|
|
16
|
+
print(f"Error occurred while running the post-install script: {e}")
|
|
17
|
+
sys.exit(1)
|
|
18
|
+
return setup_kwargs
|
|
19
|
+
|
|
20
|
+
if __name__ == "__main__":
|
|
21
|
+
build({})
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
model_name: "unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit"
|
|
2
|
+
hf_model_name: "mervinpraison/llama-3.1-tamilan-8B-test"
|
|
3
|
+
max_seq_length: 2048
|
|
4
|
+
load_in_4bit: true
|
|
5
|
+
lora_r: 16
|
|
6
|
+
lora_target_modules:
|
|
7
|
+
- "q_proj"
|
|
8
|
+
- "k_proj"
|
|
9
|
+
- "v_proj"
|
|
10
|
+
- "o_proj"
|
|
11
|
+
- "gate_proj"
|
|
12
|
+
- "up_proj"
|
|
13
|
+
- "down_proj"
|
|
14
|
+
lora_alpha: 16
|
|
15
|
+
lora_dropout: 0
|
|
16
|
+
lora_bias: "none"
|
|
17
|
+
use_gradient_checkpointing: "unsloth"
|
|
18
|
+
random_state: 3407
|
|
19
|
+
use_rslora: false
|
|
20
|
+
loftq_config: null
|
|
21
|
+
|
|
22
|
+
dataset:
|
|
23
|
+
- name: "yahma/alpaca-cleaned"
|
|
24
|
+
split_type: "train"
|
|
25
|
+
processing_func: "format_prompts"
|
|
26
|
+
rename:
|
|
27
|
+
input: "input"
|
|
28
|
+
output: "output"
|
|
29
|
+
instruction: "instruction"
|
|
30
|
+
filter_data: false
|
|
31
|
+
filter_column_value: "id"
|
|
32
|
+
filter_value: "alpaca"
|
|
33
|
+
num_samples: 20000
|
|
34
|
+
|
|
35
|
+
dataset_text_field: "text"
|
|
36
|
+
dataset_num_proc: 2
|
|
37
|
+
packing: false
|
|
38
|
+
|
|
39
|
+
per_device_train_batch_size: 2
|
|
40
|
+
gradient_accumulation_steps: 2
|
|
41
|
+
warmup_steps: 5
|
|
42
|
+
num_train_epochs: 1
|
|
43
|
+
max_steps: 10
|
|
44
|
+
learning_rate: 2.0e-4
|
|
45
|
+
logging_steps: 1
|
|
46
|
+
optim: "adamw_8bit"
|
|
47
|
+
weight_decay: 0.01
|
|
48
|
+
lr_scheduler_type: "linear"
|
|
49
|
+
seed: 3407
|
|
50
|
+
output_dir: "outputs"
|
|
51
|
+
|
|
52
|
+
quantization_method:
|
|
53
|
+
- "q4_k_m"
|
|
54
|
+
- "q8_0"
|
|
55
|
+
- "q5_k_m"
|
|
56
|
+
|
|
57
|
+
ollama_model: "llama3.1-tamilan-test"
|
|
58
|
+
model_parameters: "8b"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
import os
|
|
3
|
+
import sys
|
|
4
|
+
import platform
|
|
5
|
+
|
|
6
|
+
def main():
|
|
7
|
+
script_dir = os.path.dirname(os.path.abspath(__file__))
|
|
8
|
+
script_path = os.path.join(script_dir, 'setup_conda_env.sh')
|
|
9
|
+
|
|
10
|
+
if platform.system() == 'Windows':
|
|
11
|
+
print("Windows detected. Please run the setup_conda_env.sh script manually in Git Bash or WSL.")
|
|
12
|
+
print(f"Script location: {script_path}")
|
|
13
|
+
sys.exit(1)
|
|
14
|
+
|
|
15
|
+
try:
|
|
16
|
+
subprocess.check_call(['bash', script_path])
|
|
17
|
+
except subprocess.CalledProcessError as e:
|
|
18
|
+
print(f"Error occurred while running the setup script: {e}")
|
|
19
|
+
print("Setup failed. Please check the error message above and try to resolve the issue.")
|
|
20
|
+
sys.exit(1)
|
|
21
|
+
|
|
22
|
+
print("Conda environment setup completed successfully!")
|
|
23
|
+
|
|
24
|
+
if __name__ == "__main__":
|
|
25
|
+
main()
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Detect OS and architecture
|
|
4
|
+
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
5
|
+
# macOS
|
|
6
|
+
if [[ $(uname -m) == 'arm64' ]]; then
|
|
7
|
+
MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh"
|
|
8
|
+
else
|
|
9
|
+
MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh"
|
|
10
|
+
fi
|
|
11
|
+
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
12
|
+
# Linux
|
|
13
|
+
MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"
|
|
14
|
+
elif [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
|
|
15
|
+
# Windows
|
|
16
|
+
MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe"
|
|
17
|
+
echo "Windows detected. Please run this script in Git Bash or WSL."
|
|
18
|
+
exit 1
|
|
19
|
+
else
|
|
20
|
+
echo "Unsupported operating system: $OSTYPE"
|
|
21
|
+
exit 1
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
# Check if conda is already installed
|
|
25
|
+
if ! command -v conda &> /dev/null; then
|
|
26
|
+
echo "Conda is not installed. Installing Miniconda..."
|
|
27
|
+
wget $MINICONDA_URL -O ~/miniconda.sh
|
|
28
|
+
bash ~/miniconda.sh -b -p $HOME/miniconda
|
|
29
|
+
source $HOME/miniconda/bin/activate
|
|
30
|
+
conda init
|
|
31
|
+
else
|
|
32
|
+
echo "Conda is already installed."
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
# Create and activate the Conda environment
|
|
36
|
+
ENV_NAME="unsloth_env"
|
|
37
|
+
if conda info --envs | grep -q $ENV_NAME; then
|
|
38
|
+
echo "Environment $ENV_NAME already exists. Recreating..."
|
|
39
|
+
conda env remove -y -n $ENV_NAME # Remove existing environment
|
|
40
|
+
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
41
|
+
# macOS (both Intel and M1/M2)
|
|
42
|
+
conda create --name $ENV_NAME python=3.10 pytorch=2.3.0 -c pytorch -y
|
|
43
|
+
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
44
|
+
# Linux
|
|
45
|
+
conda create --name $ENV_NAME python=3.10 pytorch=2.3.0 cudatoolkit=11.8 -c pytorch -c nvidia -y
|
|
46
|
+
fi
|
|
47
|
+
# conda activate $ENV_NAME
|
|
48
|
+
else
|
|
49
|
+
echo "Creating new environment $ENV_NAME..."
|
|
50
|
+
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
51
|
+
# macOS (both Intel and M1/M2)
|
|
52
|
+
conda create --name $ENV_NAME python=3.10 pytorch=2.3.0 -c pytorch -y
|
|
53
|
+
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
54
|
+
# Linux
|
|
55
|
+
conda create --name $ENV_NAME python=3.10 pytorch=2.3.0 cudatoolkit=11.8 -c pytorch -c nvidia -y
|
|
56
|
+
fi
|
|
57
|
+
# conda activate $ENV_NAME
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
# source $HOME/miniconda/bin/activate $ENV_NAME
|
|
61
|
+
|
|
62
|
+
# Get full path of pip
|
|
63
|
+
PIP_FULL_PATH=$(conda run -n $ENV_NAME which pip)
|
|
64
|
+
|
|
65
|
+
# Install other packages within the activated environment
|
|
66
|
+
# Use PIP_FULL_PATH to run pip commands
|
|
67
|
+
$PIP_FULL_PATH install --upgrade pip
|
|
68
|
+
$PIP_FULL_PATH install "xformers==0.0.26.post1"
|
|
69
|
+
$PIP_FULL_PATH install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git@4e570be9ae4ced8cdc64e498125708e34942befc"
|
|
70
|
+
$PIP_FULL_PATH install --no-deps "trl<0.9.0" peft accelerate bitsandbytes
|
|
71
|
+
|
|
72
|
+
echo "Setup completed successfully!"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "PraisonAI"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.59rc6"
|
|
4
4
|
description = "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
|
authors = ["Mervin Praison"]
|
|
6
6
|
license = ""
|
|
@@ -112,4 +112,4 @@ style = "semver"
|
|
|
112
112
|
|
|
113
113
|
[tool.poetry.build]
|
|
114
114
|
generate-setup-file = false
|
|
115
|
-
script = "setup/post_install.py"
|
|
115
|
+
script = "praisonai/setup/post_install.py"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|