PraisonAI 0.0.10__tar.gz → 0.0.11__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.
- {praisonai-0.0.10 → praisonai-0.0.11}/PKG-INFO +5 -1
- {praisonai-0.0.10 → praisonai-0.0.11}/README.md +4 -0
- {praisonai-0.0.10 → praisonai-0.0.11}/praisonai/cli.py +7 -1
- praisonai-0.0.11/praisonai/deploy.py +39 -0
- {praisonai-0.0.10 → praisonai-0.0.11}/pyproject.toml +1 -1
- {praisonai-0.0.10 → praisonai-0.0.11}/praisonai/__init__.py +0 -0
- {praisonai-0.0.10 → praisonai-0.0.11}/praisonai/__main__.py +0 -0
- {praisonai-0.0.10 → praisonai-0.0.11}/praisonai/auto-old.py +0 -0
- {praisonai-0.0.10 → praisonai-0.0.11}/praisonai/auto.py +0 -0
- {praisonai-0.0.10 → praisonai-0.0.11}/praisonai/cli-old.py +0 -0
- {praisonai-0.0.10 → praisonai-0.0.11}/praisonai/test.py +0 -0
- {praisonai-0.0.10 → praisonai-0.0.11}/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.11
|
|
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
|
|
@@ -143,6 +143,10 @@ if __name__ == "__main__":
|
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
145
|
gcloud init
|
|
146
|
+
gcloud services enable run.googleapis.com
|
|
147
|
+
gcloud services enable containerregistry.googleapis.com
|
|
148
|
+
gcloud services enable cloudbuild.googleapis.com
|
|
149
|
+
|
|
146
150
|
export OPENAI_MODEL_NAME="gpt-4-turbo-preview"
|
|
147
151
|
export OPENAI_API_KEY="Enter your API key"
|
|
148
152
|
export OPENAI_API_BASE="https://api.openai.com/v1"
|
|
@@ -123,6 +123,10 @@ if __name__ == "__main__":
|
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
125
|
gcloud init
|
|
126
|
+
gcloud services enable run.googleapis.com
|
|
127
|
+
gcloud services enable containerregistry.googleapis.com
|
|
128
|
+
gcloud services enable cloudbuild.googleapis.com
|
|
129
|
+
|
|
126
130
|
export OPENAI_MODEL_NAME="gpt-4-turbo-preview"
|
|
127
131
|
export OPENAI_API_KEY="Enter your API key"
|
|
128
132
|
export OPENAI_API_BASE="https://api.openai.com/v1"
|
|
@@ -107,12 +107,17 @@ class PraisonAI:
|
|
|
107
107
|
if args is None:
|
|
108
108
|
result = self.generate_crew_and_kickoff()
|
|
109
109
|
return result
|
|
110
|
+
if args.deploy:
|
|
111
|
+
from .deploy import CloudDeployer
|
|
112
|
+
deployer = CloudDeployer()
|
|
113
|
+
deployer.run_commands()
|
|
114
|
+
return
|
|
110
115
|
invocation_cmd = "praisonai"
|
|
111
116
|
version_string = f"praisonAI version {__version__}"
|
|
112
117
|
|
|
113
118
|
# if args.framework:
|
|
114
119
|
# self.framework = args.framework
|
|
115
|
-
ui = args.ui
|
|
120
|
+
ui = args.ui
|
|
116
121
|
|
|
117
122
|
if args.agent_file:
|
|
118
123
|
if args.agent_file == "tests.test": # Argument used for testing purposes
|
|
@@ -157,6 +162,7 @@ class PraisonAI:
|
|
|
157
162
|
parser.add_argument("--init", nargs=argparse.REMAINDER, help="Enable auto mode and pass arguments for it")
|
|
158
163
|
parser.add_argument("agent_file", nargs="?", help="Specify the agent file")
|
|
159
164
|
parser.add_argument("-b", "--bind", help=argparse.SUPPRESS) # This will catch and ignore -b
|
|
165
|
+
parser.add_argument("--deploy", action="store_true", help="Deploy the application") # New argument
|
|
160
166
|
|
|
161
167
|
args = parser.parse_args()
|
|
162
168
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
import os
|
|
3
|
+
from dotenv import load_dotenv
|
|
4
|
+
|
|
5
|
+
class CloudDeployer:
|
|
6
|
+
def __init__(self):
|
|
7
|
+
# Load environment variables from .env file or system
|
|
8
|
+
load_dotenv()
|
|
9
|
+
self.set_environment_variables()
|
|
10
|
+
|
|
11
|
+
def set_environment_variables(self):
|
|
12
|
+
"""Sets environment variables with fallback to .env values or defaults."""
|
|
13
|
+
os.environ["OPENAI_MODEL_NAME"] = os.getenv("OPENAI_MODEL_NAME", "gpt-4-turbo-preview")
|
|
14
|
+
os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY", "Enter your API key")
|
|
15
|
+
os.environ["OPENAI_API_BASE"] = os.getenv("OPENAI_API_BASE", "https://api.openai.com/v1")
|
|
16
|
+
|
|
17
|
+
def run_commands(self):
|
|
18
|
+
"""Runs a sequence of shell commands for deployment, continues on error."""
|
|
19
|
+
commands = [
|
|
20
|
+
"yes | gcloud auth configure-docker us-central1-docker.pkg.dev",
|
|
21
|
+
"gcloud artifacts repositories create praisonai-repository --repository-format=docker --location=us-central1",
|
|
22
|
+
"$(gcloud config get-value project)",
|
|
23
|
+
"docker build --platform linux/amd64 -t gcr.io/$(gcloud config get-value project)/praisonai-app:latest .",
|
|
24
|
+
"docker tag gcr.io/$(gcloud config get-value project)/praisonai-app:latest us-central1-docker.pkg.dev/$(gcloud config get-value project)/praisonai-repository/praisonai-app:latest",
|
|
25
|
+
"docker push us-central1-docker.pkg.dev/$(gcloud config get-value project)/praisonai-repository/praisonai-app:latest",
|
|
26
|
+
"gcloud run deploy praisonai-service --image us-central1-docker.pkg.dev/$(gcloud config get-value project)/praisonai-repository/praisonai-app:latest --platform managed --region us-central1 --allow-unauthenticated --set-env-vars OPENAI_MODEL_NAME=${OPENAI_MODEL_NAME},OPENAI_API_KEY=${OPENAI_API_KEY},OPENAI_API_BASE=${OPENAI_API_BASE}"
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
for cmd in commands:
|
|
30
|
+
try:
|
|
31
|
+
subprocess.run(cmd, shell=True, check=True)
|
|
32
|
+
except subprocess.CalledProcessError as e:
|
|
33
|
+
print(f"ERROR: Command '{e.cmd}' failed with exit status {e.returncode}")
|
|
34
|
+
print(f"Continuing with the next command...")
|
|
35
|
+
|
|
36
|
+
# Usage
|
|
37
|
+
if __name__ == "__main__":
|
|
38
|
+
deployer = CloudDeployer()
|
|
39
|
+
deployer.run_commands()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "praisonAI"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.11"
|
|
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 = ""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|