PraisonAI 0.0.9__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.
@@ -0,0 +1,168 @@
1
+ Metadata-Version: 2.1
2
+ Name: praisonAI
3
+ Version: 0.0.11
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
+ Author: Mervin Praison
6
+ Requires-Python: >=3.10,<3.13
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.10
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Provides-Extra: tools
12
+ Requires-Dist: Flask (>=3.0.0)
13
+ Requires-Dist: crewai (>=0.22.5)
14
+ Requires-Dist: gradio (>=4.20.0)
15
+ Requires-Dist: pyautogen (>=0.2.19)
16
+ Requires-Dist: rich (>=13.7)
17
+ Project-URL: Homepage, https://github.com/mervinpraison/praisonAI
18
+ Project-URL: Repository, https://github.com/mervinpraison/praisonAI
19
+ Description-Content-Type: text/markdown
20
+
21
+ # Praison AI
22
+
23
+ Praison AI, leveraging both AutoGen and CrewAI or any other agent framework, represents a low-code, centralised framework designed to simplify the creation and orchestration of multi-agent systems for various LLM applications, emphasizing ease of use, customization, and human-agent interaction.
24
+
25
+ ## Installation
26
+
27
+ ```bash
28
+ pip install praisonai
29
+ ```
30
+
31
+ ## Initialise
32
+
33
+ ```bash
34
+ praisonai --init create a movie script about dog in moon
35
+ ```
36
+ This will automatically create agents.yaml file in the current directory.
37
+
38
+
39
+ ## Run
40
+
41
+ ```bash
42
+ praisonai
43
+ ```
44
+
45
+ or
46
+
47
+ ```bash
48
+ python -m praisonai
49
+ ```
50
+
51
+ ### Specify the agent framework
52
+
53
+ ```bash
54
+ praisonai --framework autogen
55
+ ```
56
+
57
+ ### Full Automatic Mode
58
+
59
+ ```bash
60
+ praisonai --auto create a movie script about Dog in Moon
61
+ ```
62
+
63
+ ## Test
64
+
65
+ ```bash
66
+ python -m unittest tests.test
67
+ ```
68
+
69
+ ## Agents Playbook
70
+
71
+ ```yaml
72
+ framework: crewai
73
+ topic: Artificial Intelligence
74
+ roles:
75
+ movie_concept_creator:
76
+ backstory: 'Creative thinker with a deep understanding of cinematic storytelling,
77
+ capable of using AI-generated storylines to create unique and compelling movie
78
+ ideas.'
79
+ goal: Generate engaging movie concepts using AI storylines
80
+ role: Movie Concept Creator
81
+ tasks:
82
+ movie_concept_development:
83
+ description: 'Develop movie concepts from AI-generated storylines, ensuring
84
+ they are engaging and have strong narrative arcs.'
85
+ expected_output: 'Well-structured movie concept document with character
86
+ bios, settings, and plot outlines.'
87
+ screenwriter:
88
+ backstory: 'Expert in writing engaging dialogue and script structure, able to
89
+ turn movie concepts into production-ready scripts.'
90
+ goal: Write compelling scripts based on movie concepts
91
+ role: Screenwriter
92
+ tasks:
93
+ scriptwriting_task:
94
+ description: 'Turn movie concepts into polished scripts with well-developed
95
+ characters, strong dialogue, and effective scene transitions.'
96
+ expected_output: 'Production-ready script with a beginning, middle, and
97
+ end, along with character development and engaging dialogues.'
98
+ editor:
99
+ backstory: 'Adept at identifying inconsistencies, improving language usage,
100
+ and maintaining the overall flow of the script.'
101
+ goal: Refine the scripts and ensure continuity of the movie storyline
102
+ role: Editor
103
+ tasks:
104
+ editing_task:
105
+ description: 'Review, edit, and refine the scripts to ensure they are cohesive
106
+ and follow a well-structured narrative.'
107
+ expected_output: 'A polished final draft of the script with no inconsistencies,
108
+ strong character development, and effective dialogue.'
109
+ dependencies: []
110
+ ```
111
+
112
+ ## Include praisonai package in your project
113
+
114
+ ```python
115
+ from praisonai import PraisonAI
116
+
117
+ def basic(): # Basic Mode
118
+ praison_ai = PraisonAI(agent_file="agents.yaml")
119
+ praison_ai.main()
120
+
121
+ def advanced(): # Advanced Mode with options
122
+ praison_ai = PraisonAI(
123
+ agent_file="agents.yaml",
124
+ framework="autogen",
125
+ )
126
+ praison_ai.main()
127
+
128
+ def auto(): # Full Automatic Mode
129
+ praison_ai = PraisonAI(
130
+ auto="Create a movie script about car in mars",
131
+ framework="autogen"
132
+ )
133
+ print(praison_ai.framework)
134
+ praison_ai.main()
135
+
136
+ if __name__ == "__main__":
137
+ basic()
138
+ advanced()
139
+ auto()
140
+ ```
141
+
142
+ ## Deploy
143
+
144
+ ```bash
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
+
150
+ export OPENAI_MODEL_NAME="gpt-4-turbo-preview"
151
+ export OPENAI_API_KEY="Enter your API key"
152
+ export OPENAI_API_BASE="https://api.openai.com/v1"
153
+
154
+ yes | gcloud auth configure-docker us-central1-docker.pkg.dev
155
+ gcloud artifacts repositories create praisonai-repository --repository-format=docker --location=us-central1
156
+
157
+ PROJECT_ID=$(gcloud config get-value project)
158
+ TAG="latest"
159
+ docker build --platform linux/amd64 -t gcr.io/${PROJECT_ID}/praisonai-app:${TAG} .
160
+ docker tag gcr.io/${PROJECT_ID}/praisonai-app:${TAG} us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG}
161
+ docker push us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG}
162
+
163
+ gcloud run deploy praisonai-service \
164
+ --image us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG} \
165
+ --platform managed \
166
+ --region us-central1 \
167
+ --allow-unauthenticated \
168
+ --set-env-vars OPENAI_MODEL_NAME=${OPENAI_MODEL_NAME},OPENAI_API_KEY=${OPENAI_API_KEY},OPENAI_API_BASE=${OPENAI_API_BASE}
@@ -0,0 +1,148 @@
1
+ # Praison AI
2
+
3
+ Praison AI, leveraging both AutoGen and CrewAI or any other agent framework, represents a low-code, centralised framework designed to simplify the creation and orchestration of multi-agent systems for various LLM applications, emphasizing ease of use, customization, and human-agent interaction.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install praisonai
9
+ ```
10
+
11
+ ## Initialise
12
+
13
+ ```bash
14
+ praisonai --init create a movie script about dog in moon
15
+ ```
16
+ This will automatically create agents.yaml file in the current directory.
17
+
18
+
19
+ ## Run
20
+
21
+ ```bash
22
+ praisonai
23
+ ```
24
+
25
+ or
26
+
27
+ ```bash
28
+ python -m praisonai
29
+ ```
30
+
31
+ ### Specify the agent framework
32
+
33
+ ```bash
34
+ praisonai --framework autogen
35
+ ```
36
+
37
+ ### Full Automatic Mode
38
+
39
+ ```bash
40
+ praisonai --auto create a movie script about Dog in Moon
41
+ ```
42
+
43
+ ## Test
44
+
45
+ ```bash
46
+ python -m unittest tests.test
47
+ ```
48
+
49
+ ## Agents Playbook
50
+
51
+ ```yaml
52
+ framework: crewai
53
+ topic: Artificial Intelligence
54
+ roles:
55
+ movie_concept_creator:
56
+ backstory: 'Creative thinker with a deep understanding of cinematic storytelling,
57
+ capable of using AI-generated storylines to create unique and compelling movie
58
+ ideas.'
59
+ goal: Generate engaging movie concepts using AI storylines
60
+ role: Movie Concept Creator
61
+ tasks:
62
+ movie_concept_development:
63
+ description: 'Develop movie concepts from AI-generated storylines, ensuring
64
+ they are engaging and have strong narrative arcs.'
65
+ expected_output: 'Well-structured movie concept document with character
66
+ bios, settings, and plot outlines.'
67
+ screenwriter:
68
+ backstory: 'Expert in writing engaging dialogue and script structure, able to
69
+ turn movie concepts into production-ready scripts.'
70
+ goal: Write compelling scripts based on movie concepts
71
+ role: Screenwriter
72
+ tasks:
73
+ scriptwriting_task:
74
+ description: 'Turn movie concepts into polished scripts with well-developed
75
+ characters, strong dialogue, and effective scene transitions.'
76
+ expected_output: 'Production-ready script with a beginning, middle, and
77
+ end, along with character development and engaging dialogues.'
78
+ editor:
79
+ backstory: 'Adept at identifying inconsistencies, improving language usage,
80
+ and maintaining the overall flow of the script.'
81
+ goal: Refine the scripts and ensure continuity of the movie storyline
82
+ role: Editor
83
+ tasks:
84
+ editing_task:
85
+ description: 'Review, edit, and refine the scripts to ensure they are cohesive
86
+ and follow a well-structured narrative.'
87
+ expected_output: 'A polished final draft of the script with no inconsistencies,
88
+ strong character development, and effective dialogue.'
89
+ dependencies: []
90
+ ```
91
+
92
+ ## Include praisonai package in your project
93
+
94
+ ```python
95
+ from praisonai import PraisonAI
96
+
97
+ def basic(): # Basic Mode
98
+ praison_ai = PraisonAI(agent_file="agents.yaml")
99
+ praison_ai.main()
100
+
101
+ def advanced(): # Advanced Mode with options
102
+ praison_ai = PraisonAI(
103
+ agent_file="agents.yaml",
104
+ framework="autogen",
105
+ )
106
+ praison_ai.main()
107
+
108
+ def auto(): # Full Automatic Mode
109
+ praison_ai = PraisonAI(
110
+ auto="Create a movie script about car in mars",
111
+ framework="autogen"
112
+ )
113
+ print(praison_ai.framework)
114
+ praison_ai.main()
115
+
116
+ if __name__ == "__main__":
117
+ basic()
118
+ advanced()
119
+ auto()
120
+ ```
121
+
122
+ ## Deploy
123
+
124
+ ```bash
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
+
130
+ export OPENAI_MODEL_NAME="gpt-4-turbo-preview"
131
+ export OPENAI_API_KEY="Enter your API key"
132
+ export OPENAI_API_BASE="https://api.openai.com/v1"
133
+
134
+ yes | gcloud auth configure-docker us-central1-docker.pkg.dev
135
+ gcloud artifacts repositories create praisonai-repository --repository-format=docker --location=us-central1
136
+
137
+ PROJECT_ID=$(gcloud config get-value project)
138
+ TAG="latest"
139
+ docker build --platform linux/amd64 -t gcr.io/${PROJECT_ID}/praisonai-app:${TAG} .
140
+ docker tag gcr.io/${PROJECT_ID}/praisonai-app:${TAG} us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG}
141
+ docker push us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG}
142
+
143
+ gcloud run deploy praisonai-service \
144
+ --image us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG} \
145
+ --platform managed \
146
+ --region us-central1 \
147
+ --allow-unauthenticated \
148
+ --set-env-vars OPENAI_MODEL_NAME=${OPENAI_MODEL_NAME},OPENAI_API_KEY=${OPENAI_API_KEY},OPENAI_API_BASE=${OPENAI_API_BASE}
@@ -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 # Default UI flag
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
@@ -156,8 +161,16 @@ class PraisonAI:
156
161
  parser.add_argument("--auto", nargs=argparse.REMAINDER, help="Enable auto mode and pass arguments for it")
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")
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
159
166
 
160
- return parser.parse_args()
167
+ args = parser.parse_args()
168
+
169
+ # If -b was provided, remove it and its value from args
170
+ if hasattr(args, "bind") and args.bind is not None:
171
+ delattr(args, "bind")
172
+
173
+ return args
161
174
 
162
175
  def create_gradio_interface(self):
163
176
  def generate_crew_and_kickoff_interface(agent_file, framework):
@@ -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.9"
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 = ""
@@ -19,6 +19,7 @@ rich = ">=13.7"
19
19
  pyautogen = ">=0.2.19"
20
20
  crewai = ">=0.22.5"
21
21
  gradio = ">=4.20.0"
22
+ Flask = ">=3.0.0"
22
23
 
23
24
  [tool.poetry.dev-dependencies]
24
25
  pytest = "^5.2"
praisonai-0.0.9/PKG-INFO DELETED
@@ -1,40 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: praisonAI
3
- Version: 0.0.9
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
- Author: Mervin Praison
6
- Requires-Python: >=3.10,<3.13
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: Programming Language :: Python :: 3.10
9
- Classifier: Programming Language :: Python :: 3.11
10
- Classifier: Programming Language :: Python :: 3.12
11
- Provides-Extra: tools
12
- Requires-Dist: crewai (>=0.22.5)
13
- Requires-Dist: gradio (>=4.20.0)
14
- Requires-Dist: pyautogen (>=0.2.19)
15
- Requires-Dist: rich (>=13.7)
16
- Project-URL: Homepage, https://github.com/mervinpraison/praisonAI
17
- Project-URL: Repository, https://github.com/mervinpraison/praisonAI
18
- Description-Content-Type: text/markdown
19
-
20
- # Praison AI
21
-
22
- Praison AI, leveraging both AutoGen and CrewAI or any other agent framework, represents a low-code, centralised framework designed to simplify the creation and orchestration of multi-agent systems for various LLM applications, emphasizing ease of use, customization, and human-agent interaction.
23
-
24
- ## Installation
25
-
26
- ```bash
27
- pip install praisonai
28
- ```
29
-
30
- ## Run
31
-
32
- ```bash
33
- praisonai
34
- ```
35
-
36
- ## Test
37
-
38
- ```bash
39
- python -m unittest tests.test
40
- ```
praisonai-0.0.9/README.md DELETED
@@ -1,21 +0,0 @@
1
- # Praison AI
2
-
3
- Praison AI, leveraging both AutoGen and CrewAI or any other agent framework, represents a low-code, centralised framework designed to simplify the creation and orchestration of multi-agent systems for various LLM applications, emphasizing ease of use, customization, and human-agent interaction.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- pip install praisonai
9
- ```
10
-
11
- ## Run
12
-
13
- ```bash
14
- praisonai
15
- ```
16
-
17
- ## Test
18
-
19
- ```bash
20
- python -m unittest tests.test
21
- ```
File without changes
File without changes