PraisonAI 0.0.48__py3-none-any.whl → 0.0.50__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.
- praisonai/deploy.py +1 -1
- praisonai/ui/context.py +35 -3
- {praisonai-0.0.48.dist-info → praisonai-0.0.50.dist-info}/METADATA +2 -1
- {praisonai-0.0.48.dist-info → praisonai-0.0.50.dist-info}/RECORD +7 -7
- {praisonai-0.0.48.dist-info → praisonai-0.0.50.dist-info}/LICENSE +0 -0
- {praisonai-0.0.48.dist-info → praisonai-0.0.50.dist-info}/WHEEL +0 -0
- {praisonai-0.0.48.dist-info → praisonai-0.0.50.dist-info}/entry_points.txt +0 -0
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.
|
|
59
|
+
file.write("RUN pip install flask praisonai==0.0.50 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
|
|
praisonai/ui/context.py
CHANGED
|
@@ -1,23 +1,54 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import fnmatch
|
|
3
3
|
import re
|
|
4
|
+
import yaml
|
|
5
|
+
import logging
|
|
6
|
+
# Set up logging
|
|
7
|
+
logger = logging.getLogger(__name__)
|
|
8
|
+
log_level = os.getenv("LOGLEVEL", "INFO").upper()
|
|
9
|
+
logger.handlers = []
|
|
10
|
+
|
|
11
|
+
# Set up logging to console
|
|
12
|
+
console_handler = logging.StreamHandler()
|
|
13
|
+
console_handler.setLevel(log_level)
|
|
14
|
+
console_formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
|
15
|
+
console_handler.setFormatter(console_formatter)
|
|
16
|
+
logger.addHandler(console_handler)
|
|
17
|
+
|
|
18
|
+
# Set the logging level for the logger
|
|
19
|
+
logger.setLevel(log_level)
|
|
4
20
|
|
|
5
21
|
class ContextGatherer:
|
|
6
22
|
def __init__(self, directory='.', output_file='context.txt',
|
|
7
|
-
relevant_extensions=None, max_file_size=1_000_000, max_tokens=
|
|
23
|
+
relevant_extensions=None, max_file_size=1_000_000, max_tokens=128000):
|
|
8
24
|
self.directory = directory
|
|
9
25
|
self.output_file = output_file
|
|
10
26
|
self.relevant_extensions = relevant_extensions or ['.py']
|
|
11
27
|
self.max_file_size = max_file_size
|
|
12
|
-
self.max_tokens = max_tokens
|
|
28
|
+
self.max_tokens = int(os.getenv("PRAISONAI_MAX_TOKENS", max_tokens))
|
|
13
29
|
self.ignore_patterns = self.get_ignore_patterns()
|
|
14
30
|
|
|
15
31
|
def get_ignore_patterns(self):
|
|
16
32
|
"""Read .gitignore file and return ignore patterns."""
|
|
33
|
+
|
|
34
|
+
settings_path = os.path.join(self.directory, 'settings.yaml')
|
|
35
|
+
if os.path.exists(settings_path):
|
|
36
|
+
with open(settings_path, 'r') as f:
|
|
37
|
+
settings = yaml.safe_load(f)
|
|
38
|
+
if 'code' in settings and 'ignore_files' in settings['code']:
|
|
39
|
+
logger.debug(f"Ignored settings.yaml files: {settings['code']['ignore_files']}")
|
|
40
|
+
return settings['code']['ignore_files']
|
|
41
|
+
|
|
42
|
+
# If settings.yaml doesn't exist, get from env variable
|
|
43
|
+
ignore_files_env = os.getenv("PRAISONAI_IGNORE_FILES")
|
|
44
|
+
if ignore_files_env:
|
|
45
|
+
logger.debug(f"Ignored PRAISONAI_IGNORE_FILES ENV files: {ignore_files_env}")
|
|
46
|
+
return ignore_files_env.split(",")
|
|
47
|
+
|
|
17
48
|
default_patterns = [".*", "*.pyc", "__pycache__", ".git", ".gitignore", ".vscode",
|
|
18
49
|
".idea", ".DS_Store", "*.lock", "*.pyc", ".env",
|
|
19
50
|
"docs", "tests", "test", "tmp", "temp",
|
|
20
|
-
"*.txt", "*.md", "*.json", "*.csv", "*.tsv",
|
|
51
|
+
"*.txt", "*.md", "*.json", "*.csv", "*.tsv","public",
|
|
21
52
|
"*.sql", "*.sqlite", "*.db", "*.db3", "*.sqlite3", "*.log", "*.zip", "*.gz",
|
|
22
53
|
"*.tar", "*.rar", "*.7z", "*.pdf", "*.jpg", "*.jpeg", "*.png", "*.gif", "*.svg",
|
|
23
54
|
"cookbooks", "assets", "__pycache__", "dist", "build", "node_modules", "venv",]
|
|
@@ -25,6 +56,7 @@ class ContextGatherer:
|
|
|
25
56
|
if os.path.exists(gitignore_path):
|
|
26
57
|
with open(gitignore_path, 'r') as f:
|
|
27
58
|
gitignore_patterns = [line.strip() for line in f if line.strip() and not line.startswith('#')]
|
|
59
|
+
logger.debug(f"Ignored gitignore and default files: {ignore_files_env}")
|
|
28
60
|
return list(set(default_patterns + gitignore_patterns))
|
|
29
61
|
return default_patterns
|
|
30
62
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.50
|
|
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
|
|
@@ -19,6 +19,7 @@ Provides-Extra: gradio
|
|
|
19
19
|
Provides-Extra: openai
|
|
20
20
|
Provides-Extra: ui
|
|
21
21
|
Requires-Dist: agentops (>=0.2.6) ; extra == "agentops"
|
|
22
|
+
Requires-Dist: aiosqlite (>=0.20.0) ; extra == "code"
|
|
22
23
|
Requires-Dist: chainlit (>=1.1.301,<2.0.0) ; extra == "ui" or extra == "chat" or extra == "code"
|
|
23
24
|
Requires-Dist: crewai (>=0.32.0)
|
|
24
25
|
Requires-Dist: flask (>=3.0.0) ; extra == "api"
|
|
@@ -4,7 +4,7 @@ praisonai/agents_generator.py,sha256=8d1WRbubvEkBrW1HZ7_xnGyqgJi0yxmXa3MgTIqef1c
|
|
|
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=VaVEJlc8c_aE2SBY6xN7WIbHrqNcXGR2xrDzFAsD2B8,14504
|
|
7
|
-
praisonai/deploy.py,sha256=
|
|
7
|
+
praisonai/deploy.py,sha256=mwBxvA39i3EmlcIplZ3Gz85druTviypkhEA-M7TrRYQ,6028
|
|
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
|
|
@@ -24,7 +24,7 @@ praisonai/public/thriller.svg,sha256=2dYY72EcgbEyTxS4QzjAm37Y4srtPWEW4vCMFki98ZI
|
|
|
24
24
|
praisonai/test.py,sha256=RZKq3UEFb6AnFFiHER3zBXfNmlteSLBlrTmOvnpnZLo,4092
|
|
25
25
|
praisonai/ui/chat.py,sha256=S3a5u0mI7RO5QFbKckz4z8b32gRTiX8kauSHvQBTMco,9238
|
|
26
26
|
praisonai/ui/code.py,sha256=KLJir8sfzNnZRm2mlAVprGBsZ6wId6yDLsSfN3A2Qdk,10012
|
|
27
|
-
praisonai/ui/context.py,sha256=
|
|
27
|
+
praisonai/ui/context.py,sha256=skZwPv0mXWFzvo75OBLM3iqKzUefXipRM9Lx_RZkzsg,7699
|
|
28
28
|
praisonai/ui/public/fantasy.svg,sha256=4Gs3kIOux-pjGtw6ogI_rv5_viVJxnE5gRwGilsSg0o,1553
|
|
29
29
|
praisonai/ui/public/game.svg,sha256=y2QMaA01m8XzuDjTOBWzupOC3-TpnUl9ah89mIhviUw,2406
|
|
30
30
|
praisonai/ui/public/logo_dark.png,sha256=frHz1zkrnivGssJgk9iy1cabojkVgm8B4MllFwL_CnI,17050
|
|
@@ -33,8 +33,8 @@ praisonai/ui/public/movie.svg,sha256=aJ2EQ8vXZusVsF2SeuAVxP4RFJzQ14T26ejrGYdBgzk
|
|
|
33
33
|
praisonai/ui/public/thriller.svg,sha256=2dYY72EcgbEyTxS4QzjAm37Y4srtPWEW4vCMFki98ZI,3163
|
|
34
34
|
praisonai/ui/sql_alchemy.py,sha256=HsyeRq-G9qbQobHWpTJHHKQiT4FvYw_7iuv-2PNh0IU,27419
|
|
35
35
|
praisonai/version.py,sha256=ugyuFliEqtAwQmH4sTlc16YXKYbFWDmfyk87fErB8-8,21
|
|
36
|
-
praisonai-0.0.
|
|
37
|
-
praisonai-0.0.
|
|
38
|
-
praisonai-0.0.
|
|
39
|
-
praisonai-0.0.
|
|
40
|
-
praisonai-0.0.
|
|
36
|
+
praisonai-0.0.50.dist-info/LICENSE,sha256=kqvFysVlnFxYOu0HxCe2HlmZmJtdmNGOxWRRkT9TsWc,1035
|
|
37
|
+
praisonai-0.0.50.dist-info/METADATA,sha256=29iTgim8km0EAHaaAfT50CorRc7yqPnKk0LaKiV4lg4,9414
|
|
38
|
+
praisonai-0.0.50.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
39
|
+
praisonai-0.0.50.dist-info/entry_points.txt,sha256=Qg41eW3A1-dvdV5tF7LqChfYof8Rihk2rN1fiEE3vnk,53
|
|
40
|
+
praisonai-0.0.50.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|