PraisonAI 0.0.40__py3-none-any.whl → 0.0.42__py3-none-any.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.

@@ -279,6 +279,9 @@ class AgentsGenerator:
279
279
  else: # framework=crewai
280
280
  if agentops_exists:
281
281
  agentops.init(os.environ.get("AGENTOPS_API_KEY"), tags=["crewai"])
282
+
283
+ tasks_dict = {}
284
+
282
285
  for role, details in config['roles'].items():
283
286
  role_filled = details['role'].format(topic=topic)
284
287
  goal_filled = details['goal'].format(topic=topic)
@@ -331,14 +334,35 @@ class AgentsGenerator:
331
334
  description_filled = task_details['description'].format(topic=topic)
332
335
  expected_output_filled = task_details['expected_output'].format(topic=topic)
333
336
 
334
- task = Task(description=description_filled, expected_output=expected_output_filled, agent=agent)
337
+ task = Task(
338
+ description=description_filled, # Clear, concise statement of what the task entails
339
+ expected_output=expected_output_filled, # Detailed description of what task's completion looks like
340
+ agent=agent, # The agent responsible for the task
341
+ tools=task_details.get('tools', []), # Functions or capabilities the agent can utilize
342
+ async_execution=task_details.get('async_execution') if task_details.get('async_execution') is not None else False, # Execute asynchronously if set
343
+ context=[], ## TODO:
344
+ config=task_details.get('config') if task_details.get('config') is not None else {}, # Additional configuration details
345
+ output_json=task_details.get('output_json') if task_details.get('output_json') is not None else None, # Outputs a JSON object
346
+ output_pydantic=task_details.get('output_pydantic') if task_details.get('output_pydantic') is not None else None, # Outputs a Pydantic model object
347
+ output_file=task_details.get('output_file') if task_details.get('output_file') is not None else "", # Saves the task output to a file
348
+ callback=task_details.get('callback') if task_details.get('callback') is not None else None, # Python callable executed with the task's output
349
+ human_input=task_details.get('human_input') if task_details.get('human_input') is not None else False, # Indicates if the task requires human feedback
350
+ create_directory=task_details.get('create_directory') if task_details.get('create_directory') is not None else False # Indicates if a directory needs to be created
351
+ )
335
352
 
336
353
  # Set tool callback if provided
337
354
  if self.task_callback:
338
355
  task.callback = self.task_callback
339
356
 
340
357
  tasks.append(task)
358
+ tasks_dict[task_name] = task
341
359
 
360
+ for role, details in config['roles'].items():
361
+ for task_name, task_details in details.get('tasks', {}).items():
362
+ task = tasks_dict[task_name]
363
+ context_tasks = [tasks_dict[ctx] for ctx in task_details.get('context', []) if ctx in tasks_dict]
364
+ task.context = context_tasks
365
+
342
366
  crew = Crew(
343
367
  agents=list(agents.values()),
344
368
  tasks=tasks,
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==0.0.40 gunicorn markdown\n")
59
+ file.write("RUN pip install flask praisonai==0.0.42 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.1
2
2
  Name: PraisonAI
3
- Version: 0.0.40
3
+ Version: 0.0.42
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
@@ -34,6 +34,14 @@ Project-URL: Homepage, https://docs.praison.ai
34
34
  Project-URL: Repository, https://github.com/mervinpraison/PraisonAI
35
35
  Description-Content-Type: text/markdown
36
36
 
37
+ <p align="center">
38
+ <picture>
39
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/praisonai-logo-large.png">
40
+ <source media="(prefers-color-scheme: light)" srcset="docs/images/praisonai-logo-black-large.png">
41
+ <img alt="PraisonAI Logo" src="docs/images/praisonai-logo-black-large.png">
42
+ </picture>
43
+ </p>
44
+
37
45
  # Praison AI
38
46
 
39
47
  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.
@@ -175,12 +183,6 @@ roles:
175
183
  - InternetSearchTool
176
184
  ```
177
185
 
178
- ## Test
179
-
180
- ```bash
181
- python -m unittest tests.test
182
- ```
183
-
184
186
  ## Agents Playbook
185
187
 
186
188
  ### Simple Playbook Example
@@ -199,49 +201,6 @@ roles:
199
201
  expected_output: 'Complete script ready for production.'
200
202
  ```
201
203
 
202
- ### Detailed Playbook Example
203
-
204
- ```yaml
205
- framework: crewai
206
- topic: Artificial Intelligence
207
- roles:
208
- movie_concept_creator:
209
- backstory: 'Creative thinker with a deep understanding of cinematic storytelling,
210
- capable of using AI-generated storylines to create unique and compelling movie
211
- ideas.'
212
- goal: Generate engaging movie concepts using AI storylines
213
- role: Movie Concept Creator
214
- tasks:
215
- movie_concept_development:
216
- description: 'Develop movie concepts from AI-generated storylines, ensuring
217
- they are engaging and have strong narrative arcs.'
218
- expected_output: 'Well-structured movie concept document with character
219
- bios, settings, and plot outlines.'
220
- screenwriter:
221
- backstory: 'Expert in writing engaging dialogue and script structure, able to
222
- turn movie concepts into production-ready scripts.'
223
- goal: Write compelling scripts based on movie concepts
224
- role: Screenwriter
225
- tasks:
226
- scriptwriting_task:
227
- description: 'Turn movie concepts into polished scripts with well-developed
228
- characters, strong dialogue, and effective scene transitions.'
229
- expected_output: 'Production-ready script with a beginning, middle, and
230
- end, along with character development and engaging dialogues.'
231
- editor:
232
- backstory: 'Adept at identifying inconsistencies, improving language usage,
233
- and maintaining the overall flow of the script.'
234
- goal: Refine the scripts and ensure continuity of the movie storyline
235
- role: Editor
236
- tasks:
237
- editing_task:
238
- description: 'Review, edit, and refine the scripts to ensure they are cohesive
239
- and follow a well-structured narrative.'
240
- expected_output: 'A polished final draft of the script with no inconsistencies,
241
- strong character development, and effective dialogue.'
242
- dependencies: []
243
- ```
244
-
245
204
  ## Include praisonai package in your project
246
205
 
247
206
  ```python
@@ -272,41 +231,6 @@ if __name__ == "__main__":
272
231
  auto()
273
232
  ```
274
233
 
275
- ## Include CrewAI Tools
276
-
277
- ```
278
- pip install "praisonai[crewai-tools]"
279
- ```
280
-
281
- ## Deploy
282
-
283
- ```bash
284
- gcloud init
285
- gcloud services enable run.googleapis.com
286
- gcloud services enable containerregistry.googleapis.com
287
- gcloud services enable cloudbuild.googleapis.com
288
-
289
- export OPENAI_MODEL_NAME="gpt-4o"
290
- export OPENAI_API_KEY="Enter your API key"
291
- export OPENAI_API_BASE="https://api.openai.com/v1"
292
-
293
- yes | gcloud auth configure-docker us-central1-docker.pkg.dev
294
- gcloud artifacts repositories create praisonai-repository --repository-format=docker --location=us-central1
295
-
296
- PROJECT_ID=$(gcloud config get-value project)
297
- TAG="latest"
298
- docker build --platform linux/amd64 -t gcr.io/${PROJECT_ID}/praisonai-app:${TAG} .
299
- docker tag gcr.io/${PROJECT_ID}/praisonai-app:${TAG} us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG}
300
- docker push us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG}
301
-
302
- gcloud run deploy praisonai-service \
303
- --image us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG} \
304
- --platform managed \
305
- --region us-central1 \
306
- --allow-unauthenticated \
307
- --set-env-vars OPENAI_MODEL_NAME=${OPENAI_MODEL_NAME},OPENAI_API_KEY=${OPENAI_API_KEY},OPENAI_API_BASE=${OPENAI_API_BASE}
308
- ```
309
-
310
234
  ### Commands to Install Dependencies:
311
235
 
312
236
  1. **Install all dependencies, including dev dependencies:**
@@ -1,10 +1,10 @@
1
1
  praisonai/__init__.py,sha256=JrgyPlzZfLlozoW7SHZ1nVJ63rLPR3ki2k5ZPywYrnI,175
2
2
  praisonai/__main__.py,sha256=MVgsjMThjBexHt4nhd760JCqvP4x0IQcwo8kULOK4FQ,144
3
- praisonai/agents_generator.py,sha256=DoRYanu16HIAcmIcxiWeHaklfY_IaFb3CUoqBvhOh4A,16930
3
+ praisonai/agents_generator.py,sha256=8d1WRbubvEkBrW1HZ7_xnGyqgJi0yxmXa3MgTIqef1c,19127
4
4
  praisonai/auto.py,sha256=9spTXqj47Hmmqv5QHRYE_RzSVHH_KoPbaZjskUj2UcE,7895
5
5
  praisonai/chainlit_ui.py,sha256=bNR7s509lp0I9JlJNvwCZRUZosC64qdvlFCt8NmFamQ,12216
6
6
  praisonai/cli.py,sha256=cwuXGubuac7yTeiqx5o5S7ZN7erZAfe-6p35b3HM5SU,11066
7
- praisonai/deploy.py,sha256=8qVrvheDCW5B9Pe7wtE2v2_hYkgYILQKHojY766ogDE,6031
7
+ praisonai/deploy.py,sha256=zDllG5qOzprqN6gxLQp4GZVDxsAhUH8gpUFZlvc3ZK8,6031
8
8
  praisonai/inbuilt_tools/__init__.py,sha256=mUKnbL6Gram9c9f2m8wJwEzURBLmPEOcHzwySBH89YA,74
9
9
  praisonai/inbuilt_tools/autogen_tools.py,sha256=svYkM2N7DVFvbiwgoAS7U_MqTOD8rHf8VD3BaFUV5_Y,14907
10
10
  praisonai/inc/__init__.py,sha256=sPDlYBBwdk0VlWzaaM_lG0_LD07lS2HRGvPdxXJFiYg,62
@@ -15,8 +15,8 @@ praisonai/public/movie.svg,sha256=aJ2EQ8vXZusVsF2SeuAVxP4RFJzQ14T26ejrGYdBgzk,12
15
15
  praisonai/public/thriller.svg,sha256=2dYY72EcgbEyTxS4QzjAm37Y4srtPWEW4vCMFki98ZI,3163
16
16
  praisonai/test.py,sha256=RZKq3UEFb6AnFFiHER3zBXfNmlteSLBlrTmOvnpnZLo,4092
17
17
  praisonai/version.py,sha256=ugyuFliEqtAwQmH4sTlc16YXKYbFWDmfyk87fErB8-8,21
18
- praisonai-0.0.40.dist-info/LICENSE,sha256=kqvFysVlnFxYOu0HxCe2HlmZmJtdmNGOxWRRkT9TsWc,1035
19
- praisonai-0.0.40.dist-info/METADATA,sha256=I4He6qzQeN2m107fBHJJ-2q9IVBV1uCJ_BY3_oJhnKE,10854
20
- praisonai-0.0.40.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
21
- praisonai-0.0.40.dist-info/entry_points.txt,sha256=Qg41eW3A1-dvdV5tF7LqChfYof8Rihk2rN1fiEE3vnk,53
22
- praisonai-0.0.40.dist-info/RECORD,,
18
+ praisonai-0.0.42.dist-info/LICENSE,sha256=kqvFysVlnFxYOu0HxCe2HlmZmJtdmNGOxWRRkT9TsWc,1035
19
+ praisonai-0.0.42.dist-info/METADATA,sha256=UUZhr0iagP5BMqQD9fHtX9B-5nrzli787_LoKOXPhqk,7967
20
+ praisonai-0.0.42.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
21
+ praisonai-0.0.42.dist-info/entry_points.txt,sha256=Qg41eW3A1-dvdV5tF7LqChfYof8Rihk2rN1fiEE3vnk,53
22
+ praisonai-0.0.42.dist-info/RECORD,,