PraisonAI 0.0.50__tar.gz → 0.0.52__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.

Files changed (39) hide show
  1. {praisonai-0.0.50 → praisonai-0.0.52}/PKG-INFO +50 -23
  2. {praisonai-0.0.50 → praisonai-0.0.52}/README.md +48 -23
  3. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/deploy.py +1 -1
  4. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/ui/context.py +53 -9
  5. {praisonai-0.0.50 → praisonai-0.0.52}/pyproject.toml +4 -2
  6. {praisonai-0.0.50 → praisonai-0.0.52}/LICENSE +0 -0
  7. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/__init__.py +0 -0
  8. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/__main__.py +0 -0
  9. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/agents_generator.py +0 -0
  10. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/auto.py +0 -0
  11. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/chainlit_ui.py +0 -0
  12. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/cli.py +0 -0
  13. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/inbuilt_tools/__init__.py +0 -0
  14. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/inbuilt_tools/autogen_tools.py +0 -0
  15. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/inc/__init__.py +0 -0
  16. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/inc/models.py +0 -0
  17. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/public/android-chrome-192x192.png +0 -0
  18. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/public/android-chrome-512x512.png +0 -0
  19. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/public/apple-touch-icon.png +0 -0
  20. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/public/fantasy.svg +0 -0
  21. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/public/favicon-16x16.png +0 -0
  22. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/public/favicon-32x32.png +0 -0
  23. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/public/favicon.ico +0 -0
  24. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/public/game.svg +0 -0
  25. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/public/logo_dark.png +0 -0
  26. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/public/logo_light.png +0 -0
  27. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/public/movie.svg +0 -0
  28. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/public/thriller.svg +0 -0
  29. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/test.py +0 -0
  30. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/ui/chat.py +0 -0
  31. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/ui/code.py +0 -0
  32. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/ui/public/fantasy.svg +0 -0
  33. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/ui/public/game.svg +0 -0
  34. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/ui/public/logo_dark.png +0 -0
  35. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/ui/public/logo_light.png +0 -0
  36. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/ui/public/movie.svg +0 -0
  37. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/ui/public/thriller.svg +0 -0
  38. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/ui/sql_alchemy.py +0 -0
  39. {praisonai-0.0.50 → praisonai-0.0.52}/praisonai/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PraisonAI
3
- Version: 0.0.50
3
+ Version: 0.0.52
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
@@ -24,6 +24,7 @@ Requires-Dist: chainlit (>=1.1.301,<2.0.0) ; extra == "ui" or extra == "chat" or
24
24
  Requires-Dist: crewai (>=0.32.0)
25
25
  Requires-Dist: flask (>=3.0.0) ; extra == "api"
26
26
  Requires-Dist: gradio (>=4.26.0) ; extra == "gradio"
27
+ Requires-Dist: greenlet (>=3.0.3) ; extra == "code"
27
28
  Requires-Dist: langchain-anthropic (>=0.1.13) ; extra == "anthropic"
28
29
  Requires-Dist: langchain-cohere (>=0.1.4) ; extra == "cohere"
29
30
  Requires-Dist: langchain-google-genai (>=1.0.4) ; extra == "google"
@@ -45,6 +46,13 @@ Description-Content-Type: text/markdown
45
46
  <img alt="PraisonAI Logo" src="docs/images/praisonai-logo-black-large.png">
46
47
  </picture>
47
48
  </p>
49
+
50
+ <p align="center">
51
+ <a href="https://github.com/MervinPraison/PraisonAI"><img src="https://static.pepy.tech/badge/PraisonAI" alt="Total Downloads"></a>
52
+ <a href="https://github.com/MervinPraison/PraisonAI"><img src="https://img.shields.io/github/v/release/MervinPraison/PraisonAI" alt="Latest Stable Version"></a>
53
+ <a href="https://github.com/MervinPraison/PraisonAI"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License"></a>
54
+ </p>
55
+
48
56
  <div align="center">
49
57
 
50
58
  # Praison AI
@@ -53,12 +61,13 @@ Description-Content-Type: text/markdown
53
61
 
54
62
  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.
55
63
 
56
- | | Cookbook | Open in Colab |
57
- | --- | --- | --- |
58
- | Basic | PraisonAI | <a target="_blank" href="https://colab.research.google.com/github/MervinPraison/PraisonAI/blob/main/cookbooks/praisonai-googlecolab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |
64
+ | | Cookbook | Open in Colab |
65
+ | ------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
66
+ | Basic | PraisonAI | <a target="_blank" href="https://colab.research.google.com/github/MervinPraison/PraisonAI/blob/main/cookbooks/praisonai-googlecolab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |
59
67
  | Include Tools | PraisonAI Tools | <a target="_blank" href="https://colab.research.google.com/github/MervinPraison/PraisonAI/blob/main/cookbooks/praisonai-tools-googlecolab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |
60
68
 
61
69
  ## TL;DR
70
+
62
71
  ```bash
63
72
  pip install praisonai
64
73
  export OPENAI_API_KEY="Enter your API key"
@@ -97,13 +106,14 @@ export OPENAI_API_KEY="Enter your API key"
97
106
  Generate your OPENAI API KEY from here: https://platform.openai.com/api-keys
98
107
 
99
108
  Note: You can use other providers such as Ollama, Mistral ... etc. Details are provided at the bottom.
100
-
109
+
101
110
  ```bash
102
111
  praisonai --init create a movie script about dog in moon
103
112
  ```
113
+
104
114
  This will automatically create agents.yaml file in the current directory.
105
115
 
106
- ### To initialse with a specific agent framework (Optional):
116
+ ### To initialise with a specific agent framework (Optional):
107
117
 
108
118
  ```bash
109
119
  praisonai --framework autogen --init create movie script about cat in mars
@@ -115,8 +125,8 @@ praisonai --framework autogen --init create movie script about cat in mars
115
125
  praisonai
116
126
  ```
117
127
 
118
- or
119
-
128
+ or
129
+
120
130
  ```bash
121
131
  python -m praisonai
122
132
  ```
@@ -135,6 +145,14 @@ praisonai --auto create a movie script about Dog in Moon
135
145
 
136
146
  ## User Interface
137
147
 
148
+ ## PraisonAI User Interfaces:
149
+
150
+ | Interface | Description | URL |
151
+ | --------- | ------------------------------------------ | --------------------------------------------------------------------- |
152
+ | **UI** | Multi Agents such as CrewAI or AutoGen | [https://docs.praisonai.com/ui/ui](https://docs.praison.ai/ui/ui) |
153
+ | **Chat** | Chat with 100+ LLMs, single AI Agent | [https://docs.praisonai.com/ui/chat](https://docs.praison.ai/ui/chat) |
154
+ | **Code** | Chat with entire Codebase, single AI Agent | [https://docs.praisonai.com/ui/code](https://docs.praison.ai/ui/code) |
155
+
138
156
  ```bash
139
157
  pip install -U "praisonai[ui]"
140
158
  export OPENAI_API_KEY="Enter your API key"
@@ -143,7 +161,7 @@ export CHAINLIT_AUTH_SECRET=xxxxxxxx
143
161
  praisonai ui
144
162
  ```
145
163
 
146
- or
164
+ or
147
165
 
148
166
  ```
149
167
  python -m praisonai ui
@@ -151,7 +169,7 @@ python -m praisonai ui
151
169
 
152
170
  ## Praison AI Chat
153
171
 
154
- * https://docs.praison.ai/chat/
172
+ - https://docs.praison.ai/chat/
155
173
 
156
174
  ```bash
157
175
  pip install "praisonai[chat]"
@@ -161,10 +179,11 @@ praisonai chat
161
179
 
162
180
  ## Create Custom Tools
163
181
 
164
- * https://docs.praison.ai/tools/custom/
182
+ - https://docs.praison.ai/tools/custom/
165
183
 
166
184
  ### Step 1: Pre-requisite to Create a Custom Tool
167
- `agents.yaml` file should be present in the current directory.
185
+
186
+ `agents.yaml` file should be present in the current directory.
168
187
 
169
188
  If it doesn't exist, create it by running the command `praisonai --init research about the latest AI News and prepare a detailed report`.
170
189
 
@@ -201,14 +220,15 @@ roles:
201
220
  role: Research Analyst
202
221
  tasks:
203
222
  gather_data:
204
- description: Conduct in-depth research on the latest AI News trends from reputable
223
+ description:
224
+ Conduct in-depth research on the latest AI News trends from reputable
205
225
  sources.
206
226
  expected_output: Comprehensive report on current AI News trends.
207
227
  tools:
208
- - InternetSearchTool
228
+ - InternetSearchTool
209
229
  ```
210
230
 
211
- ## Agents Playbook
231
+ ## Agents Playbook
212
232
 
213
233
  ### Simple Playbook Example
214
234
 
@@ -217,23 +237,23 @@ framework: crewai
217
237
  topic: Artificial Intelligence
218
238
  roles:
219
239
  screenwriter:
220
- backstory: 'Skilled in crafting scripts with engaging dialogue about {topic}.'
240
+ backstory: "Skilled in crafting scripts with engaging dialogue about {topic}."
221
241
  goal: Create scripts from concepts.
222
242
  role: Screenwriter
223
243
  tasks:
224
244
  scriptwriting_task:
225
- description: 'Develop scripts with compelling characters and dialogue about {topic}.'
226
- expected_output: 'Complete script ready for production.'
245
+ description: "Develop scripts with compelling characters and dialogue about {topic}."
246
+ expected_output: "Complete script ready for production."
227
247
  ```
228
248
 
229
249
  ## Use 100+ Models
230
250
 
231
- * https://docs.praison.ai/models/
251
+ - https://docs.praison.ai/models/
232
252
 
233
253
  ## Include praisonai package in your project
234
254
 
235
- * https://docs.praison.ai/developers/wrapper
236
- * https://docs.praison.ai/developers/wrapper-tools/
255
+ - https://docs.praison.ai/developers/wrapper
256
+ - https://docs.praison.ai/developers/wrapper-tools/
237
257
 
238
258
  ## Option 1: Using RAW YAML
239
259
 
@@ -268,8 +288,7 @@ print(result)
268
288
 
269
289
  ## Option 2: Using separate agents.yaml file
270
290
 
271
-
272
- Note: Please create agents.yaml file before hand.
291
+ Note: Please create agents.yaml file before hand.
273
292
 
274
293
  ```python
275
294
  from praisonai import PraisonAI
@@ -285,16 +304,19 @@ if __name__ == "__main__":
285
304
  ## Commands to Install Dependencies:
286
305
 
287
306
  1. **Install all dependencies, including dev dependencies:**
307
+
288
308
  ```sh
289
309
  poetry install
290
310
  ```
291
311
 
292
312
  2. **Install only documentation dependencies:**
313
+
293
314
  ```sh
294
315
  poetry install --with docs
295
316
  ```
296
317
 
297
318
  3. **Install only test dependencies:**
319
+
298
320
  ```sh
299
321
  poetry install --with test
300
322
  ```
@@ -319,3 +341,8 @@ This configuration ensures that your development dependencies are correctly cate
319
341
  ## Star History
320
342
 
321
343
  [![Star History Chart](https://api.star-history.com/svg?repos=MervinPraison/PraisonAI&type=Date)](https://docs.praison.ai)
344
+
345
+ ## License
346
+
347
+ Praison AI is an open-sourced software licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.
348
+
@@ -5,6 +5,13 @@
5
5
  <img alt="PraisonAI Logo" src="docs/images/praisonai-logo-black-large.png">
6
6
  </picture>
7
7
  </p>
8
+
9
+ <p align="center">
10
+ <a href="https://github.com/MervinPraison/PraisonAI"><img src="https://static.pepy.tech/badge/PraisonAI" alt="Total Downloads"></a>
11
+ <a href="https://github.com/MervinPraison/PraisonAI"><img src="https://img.shields.io/github/v/release/MervinPraison/PraisonAI" alt="Latest Stable Version"></a>
12
+ <a href="https://github.com/MervinPraison/PraisonAI"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License"></a>
13
+ </p>
14
+
8
15
  <div align="center">
9
16
 
10
17
  # Praison AI
@@ -13,12 +20,13 @@
13
20
 
14
21
  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.
15
22
 
16
- | | Cookbook | Open in Colab |
17
- | --- | --- | --- |
18
- | Basic | PraisonAI | <a target="_blank" href="https://colab.research.google.com/github/MervinPraison/PraisonAI/blob/main/cookbooks/praisonai-googlecolab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |
23
+ | | Cookbook | Open in Colab |
24
+ | ------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25
+ | Basic | PraisonAI | <a target="_blank" href="https://colab.research.google.com/github/MervinPraison/PraisonAI/blob/main/cookbooks/praisonai-googlecolab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |
19
26
  | Include Tools | PraisonAI Tools | <a target="_blank" href="https://colab.research.google.com/github/MervinPraison/PraisonAI/blob/main/cookbooks/praisonai-tools-googlecolab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |
20
27
 
21
28
  ## TL;DR
29
+
22
30
  ```bash
23
31
  pip install praisonai
24
32
  export OPENAI_API_KEY="Enter your API key"
@@ -57,13 +65,14 @@ export OPENAI_API_KEY="Enter your API key"
57
65
  Generate your OPENAI API KEY from here: https://platform.openai.com/api-keys
58
66
 
59
67
  Note: You can use other providers such as Ollama, Mistral ... etc. Details are provided at the bottom.
60
-
68
+
61
69
  ```bash
62
70
  praisonai --init create a movie script about dog in moon
63
71
  ```
72
+
64
73
  This will automatically create agents.yaml file in the current directory.
65
74
 
66
- ### To initialse with a specific agent framework (Optional):
75
+ ### To initialise with a specific agent framework (Optional):
67
76
 
68
77
  ```bash
69
78
  praisonai --framework autogen --init create movie script about cat in mars
@@ -75,8 +84,8 @@ praisonai --framework autogen --init create movie script about cat in mars
75
84
  praisonai
76
85
  ```
77
86
 
78
- or
79
-
87
+ or
88
+
80
89
  ```bash
81
90
  python -m praisonai
82
91
  ```
@@ -95,6 +104,14 @@ praisonai --auto create a movie script about Dog in Moon
95
104
 
96
105
  ## User Interface
97
106
 
107
+ ## PraisonAI User Interfaces:
108
+
109
+ | Interface | Description | URL |
110
+ | --------- | ------------------------------------------ | --------------------------------------------------------------------- |
111
+ | **UI** | Multi Agents such as CrewAI or AutoGen | [https://docs.praisonai.com/ui/ui](https://docs.praison.ai/ui/ui) |
112
+ | **Chat** | Chat with 100+ LLMs, single AI Agent | [https://docs.praisonai.com/ui/chat](https://docs.praison.ai/ui/chat) |
113
+ | **Code** | Chat with entire Codebase, single AI Agent | [https://docs.praisonai.com/ui/code](https://docs.praison.ai/ui/code) |
114
+
98
115
  ```bash
99
116
  pip install -U "praisonai[ui]"
100
117
  export OPENAI_API_KEY="Enter your API key"
@@ -103,7 +120,7 @@ export CHAINLIT_AUTH_SECRET=xxxxxxxx
103
120
  praisonai ui
104
121
  ```
105
122
 
106
- or
123
+ or
107
124
 
108
125
  ```
109
126
  python -m praisonai ui
@@ -111,7 +128,7 @@ python -m praisonai ui
111
128
 
112
129
  ## Praison AI Chat
113
130
 
114
- * https://docs.praison.ai/chat/
131
+ - https://docs.praison.ai/chat/
115
132
 
116
133
  ```bash
117
134
  pip install "praisonai[chat]"
@@ -121,10 +138,11 @@ praisonai chat
121
138
 
122
139
  ## Create Custom Tools
123
140
 
124
- * https://docs.praison.ai/tools/custom/
141
+ - https://docs.praison.ai/tools/custom/
125
142
 
126
143
  ### Step 1: Pre-requisite to Create a Custom Tool
127
- `agents.yaml` file should be present in the current directory.
144
+
145
+ `agents.yaml` file should be present in the current directory.
128
146
 
129
147
  If it doesn't exist, create it by running the command `praisonai --init research about the latest AI News and prepare a detailed report`.
130
148
 
@@ -161,14 +179,15 @@ roles:
161
179
  role: Research Analyst
162
180
  tasks:
163
181
  gather_data:
164
- description: Conduct in-depth research on the latest AI News trends from reputable
182
+ description:
183
+ Conduct in-depth research on the latest AI News trends from reputable
165
184
  sources.
166
185
  expected_output: Comprehensive report on current AI News trends.
167
186
  tools:
168
- - InternetSearchTool
187
+ - InternetSearchTool
169
188
  ```
170
189
 
171
- ## Agents Playbook
190
+ ## Agents Playbook
172
191
 
173
192
  ### Simple Playbook Example
174
193
 
@@ -177,23 +196,23 @@ framework: crewai
177
196
  topic: Artificial Intelligence
178
197
  roles:
179
198
  screenwriter:
180
- backstory: 'Skilled in crafting scripts with engaging dialogue about {topic}.'
199
+ backstory: "Skilled in crafting scripts with engaging dialogue about {topic}."
181
200
  goal: Create scripts from concepts.
182
201
  role: Screenwriter
183
202
  tasks:
184
203
  scriptwriting_task:
185
- description: 'Develop scripts with compelling characters and dialogue about {topic}.'
186
- expected_output: 'Complete script ready for production.'
204
+ description: "Develop scripts with compelling characters and dialogue about {topic}."
205
+ expected_output: "Complete script ready for production."
187
206
  ```
188
207
 
189
208
  ## Use 100+ Models
190
209
 
191
- * https://docs.praison.ai/models/
210
+ - https://docs.praison.ai/models/
192
211
 
193
212
  ## Include praisonai package in your project
194
213
 
195
- * https://docs.praison.ai/developers/wrapper
196
- * https://docs.praison.ai/developers/wrapper-tools/
214
+ - https://docs.praison.ai/developers/wrapper
215
+ - https://docs.praison.ai/developers/wrapper-tools/
197
216
 
198
217
  ## Option 1: Using RAW YAML
199
218
 
@@ -228,8 +247,7 @@ print(result)
228
247
 
229
248
  ## Option 2: Using separate agents.yaml file
230
249
 
231
-
232
- Note: Please create agents.yaml file before hand.
250
+ Note: Please create agents.yaml file before hand.
233
251
 
234
252
  ```python
235
253
  from praisonai import PraisonAI
@@ -245,16 +263,19 @@ if __name__ == "__main__":
245
263
  ## Commands to Install Dependencies:
246
264
 
247
265
  1. **Install all dependencies, including dev dependencies:**
266
+
248
267
  ```sh
249
268
  poetry install
250
269
  ```
251
270
 
252
271
  2. **Install only documentation dependencies:**
272
+
253
273
  ```sh
254
274
  poetry install --with docs
255
275
  ```
256
276
 
257
277
  3. **Install only test dependencies:**
278
+
258
279
  ```sh
259
280
  poetry install --with test
260
281
  ```
@@ -278,4 +299,8 @@ This configuration ensures that your development dependencies are correctly cate
278
299
 
279
300
  ## Star History
280
301
 
281
- [![Star History Chart](https://api.star-history.com/svg?repos=MervinPraison/PraisonAI&type=Date)](https://docs.praison.ai)
302
+ [![Star History Chart](https://api.star-history.com/svg?repos=MervinPraison/PraisonAI&type=Date)](https://docs.praison.ai)
303
+
304
+ ## License
305
+
306
+ Praison AI is an open-sourced software licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.
@@ -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.50 gunicorn markdown\n")
59
+ file.write("RUN pip install flask praisonai==0.0.52 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
 
@@ -20,10 +20,47 @@ logger.setLevel(log_level)
20
20
 
21
21
  class ContextGatherer:
22
22
  def __init__(self, directory='.', output_file='context.txt',
23
- relevant_extensions=None, max_file_size=1_000_000, max_tokens=128000):
23
+ relevant_extensions=None, max_file_size=1_000_000, max_tokens=900000):
24
24
  self.directory = directory
25
25
  self.output_file = output_file
26
- self.relevant_extensions = relevant_extensions or ['.py']
26
+ self.relevant_extensions = relevant_extensions or [
27
+ '.py', # Python
28
+ '.js', # JavaScript
29
+ '.ts', # TypeScript
30
+ '.java', # Java
31
+ '.rb', # Ruby
32
+ '.php', # PHP
33
+ '.pl', # Perl
34
+ '.pm', # Perl Module
35
+ '.c', # C
36
+ '.h', # C Header
37
+ '.cpp', # C++
38
+ '.hpp', # C++ Header
39
+ '.cs', # C#
40
+ '.vb', # Visual Basic
41
+ '.swift', # Swift
42
+ '.kt', # Kotlin
43
+ '.m', # Objective-C
44
+ '.mm', # Objective-C++
45
+ '.go', # Go
46
+ '.rs', # Rust
47
+ '.hs', # Haskell
48
+ '.r', # R
49
+ '.lua', # Lua
50
+ '.sh', # Shell Script
51
+ '.bat', # Batch File
52
+ '.clj', # Clojure
53
+ '.scala', # Scala
54
+ '.erl', # Erlang
55
+ '.ex', # Elixir
56
+ '.ml', # OCaml
57
+ '.fs', # F#
58
+ '.groovy', # Groovy
59
+ '.jsm', # JavaScript Module
60
+ '.jsx', # JavaScript XML
61
+ '.tsx', # TypeScript XML
62
+ '.yaml', # YAML
63
+ ]
27
64
  self.max_file_size = max_file_size
28
65
  self.max_tokens = int(os.getenv("PRAISONAI_MAX_TOKENS", max_tokens))
29
66
  self.ignore_patterns = self.get_ignore_patterns()
@@ -31,18 +68,27 @@ class ContextGatherer:
31
68
  def get_ignore_patterns(self):
32
69
  """Read .gitignore file and return ignore patterns."""
33
70
 
71
+ # 1. Check for .praisonignore
72
+ praisonignore_path = os.path.join(self.directory, '.praisonignore')
73
+ if os.path.exists(praisonignore_path):
74
+ with open(praisonignore_path, 'r') as f:
75
+ praisonignore_patterns = [line.strip() for line in f if line.strip() and not line.startswith('#')]
76
+ logger.debug(f"Using ignore patterns from .praisonignore: {praisonignore_patterns}")
77
+ return praisonignore_patterns
78
+
79
+ # 2. Fallback to settings.yaml
34
80
  settings_path = os.path.join(self.directory, 'settings.yaml')
35
81
  if os.path.exists(settings_path):
36
82
  with open(settings_path, 'r') as f:
37
83
  settings = yaml.safe_load(f)
38
84
  if 'code' in settings and 'ignore_files' in settings['code']:
39
- logger.debug(f"Ignored settings.yaml files: {settings['code']['ignore_files']}")
85
+ logger.debug(f"Using ignore patterns from settings.yaml: {settings['code']['ignore_files']}")
40
86
  return settings['code']['ignore_files']
41
-
42
- # If settings.yaml doesn't exist, get from env variable
87
+
88
+ # 3. Fallback to PRAISONAI_IGNORE_FILES env variable
43
89
  ignore_files_env = os.getenv("PRAISONAI_IGNORE_FILES")
44
90
  if ignore_files_env:
45
- logger.debug(f"Ignored PRAISONAI_IGNORE_FILES ENV files: {ignore_files_env}")
91
+ logger.debug(f"Using ignore patterns from PRAISONAI_IGNORE_FILES: {ignore_files_env}")
46
92
  return ignore_files_env.split(",")
47
93
 
48
94
  default_patterns = [".*", "*.pyc", "__pycache__", ".git", ".gitignore", ".vscode",
@@ -150,9 +196,7 @@ class ContextGatherer:
150
196
  print(f"Total number of tokens (estimated): {token_count}")
151
197
  # self.save_context(context)
152
198
  context_tree = self.get_context_tree()
153
- print("\nContext Tree Structure:")
154
- print(context_tree)
155
-
199
+ logger.debug(f"Context tree:\n{context_tree}")
156
200
  return context, token_count, context_tree
157
201
 
158
202
  def main():
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "PraisonAI"
3
- version = "0.0.50"
3
+ version = "0.0.52"
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 = ""
@@ -31,6 +31,7 @@ langchain-openai = {version = ">=0.1.7", optional = true}
31
31
  langchain-cohere = {version = ">=0.1.4", optional = true}
32
32
  litellm = {version = ">=1.41.8", optional = true}
33
33
  aiosqlite= {version = ">=0.20.0", optional = true}
34
+ greenlet = {version = ">=3.0.3", optional = true}
34
35
 
35
36
  [tool.poetry.group.docs.dependencies]
36
37
  mkdocs = "*"
@@ -79,6 +80,7 @@ langchain-openai = ">=0.1.7"
79
80
  langchain-cohere = ">=0.1.4"
80
81
  litellm = ">=1.41.8"
81
82
  aiosqlite = ">=0.20.0"
83
+ greenlet = ">=3.0.3"
82
84
 
83
85
  [build-system]
84
86
  requires = ["poetry-core"]
@@ -98,4 +100,4 @@ openai = ["langchain-openai"]
98
100
  anthropic = ["langchain-anthropic"]
99
101
  cohere = ["langchain-cohere"]
100
102
  chat = ["chainlit", "litellm"]
101
- code = ["chainlit", "litellm", "aiosqlite"]
103
+ code = ["chainlit", "litellm", "aiosqlite", "greenlet"]
File without changes
File without changes
File without changes
File without changes