PraisonAI 0.1.1__cp312-cp312-manylinux_2_35_x86_64.whl → 0.1.2__cp312-cp312-manylinux_2_35_x86_64.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/realtime.py +47 -1
- praisonai/ui/realtimeclient/__init__.py +1 -0
- {praisonai-0.1.1.dist-info → praisonai-0.1.2.dist-info}/METADATA +1 -1
- {praisonai-0.1.1.dist-info → praisonai-0.1.2.dist-info}/RECORD +8 -8
- {praisonai-0.1.1.dist-info → praisonai-0.1.2.dist-info}/LICENSE +0 -0
- {praisonai-0.1.1.dist-info → praisonai-0.1.2.dist-info}/WHEEL +0 -0
- {praisonai-0.1.1.dist-info → praisonai-0.1.2.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.1.
|
|
59
|
+
file.write("RUN pip install flask praisonai==0.1.2 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/realtime.py
CHANGED
|
@@ -144,6 +144,50 @@ cl_data._data_layer = SQLAlchemyDataLayer(conninfo=f"sqlite+aiosqlite:///{DB_PAT
|
|
|
144
144
|
|
|
145
145
|
client = AsyncOpenAI()
|
|
146
146
|
|
|
147
|
+
# Add these new imports and code
|
|
148
|
+
import importlib.util
|
|
149
|
+
import logging
|
|
150
|
+
from importlib import import_module
|
|
151
|
+
from pathlib import Path
|
|
152
|
+
|
|
153
|
+
# Set up logging
|
|
154
|
+
logging.basicConfig(level=logging.INFO)
|
|
155
|
+
logger = logging.getLogger(__name__)
|
|
156
|
+
|
|
157
|
+
# Try to import tools from the root directory
|
|
158
|
+
root_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
159
|
+
tools_path = os.path.join(root_dir, 'tools.py')
|
|
160
|
+
logger.info(f"Tools path: {tools_path}")
|
|
161
|
+
|
|
162
|
+
def import_tools_from_file(file_path):
|
|
163
|
+
spec = importlib.util.spec_from_file_location("custom_tools", file_path)
|
|
164
|
+
custom_tools_module = importlib.util.module_from_spec(spec)
|
|
165
|
+
spec.loader.exec_module(custom_tools_module)
|
|
166
|
+
logger.debug(f"Imported tools from {file_path}")
|
|
167
|
+
logger.debug(f"Tools: {custom_tools_module}")
|
|
168
|
+
return custom_tools_module
|
|
169
|
+
|
|
170
|
+
try:
|
|
171
|
+
if os.path.exists(tools_path):
|
|
172
|
+
# tools.py exists in the root directory, import from file
|
|
173
|
+
custom_tools_module = import_tools_from_file(tools_path)
|
|
174
|
+
logger.info("Successfully imported custom tools from root tools.py")
|
|
175
|
+
else:
|
|
176
|
+
logger.info("No custom tools.py file found in the root directory")
|
|
177
|
+
custom_tools_module = None
|
|
178
|
+
|
|
179
|
+
if custom_tools_module:
|
|
180
|
+
# Update the tools list with custom tools
|
|
181
|
+
if hasattr(custom_tools_module, 'tools') and isinstance(custom_tools_module.tools, list):
|
|
182
|
+
tools.extend(custom_tools_module.tools)
|
|
183
|
+
else:
|
|
184
|
+
for name, obj in custom_tools_module.__dict__.items():
|
|
185
|
+
if callable(obj) and not name.startswith("__"):
|
|
186
|
+
tools.append(({"type": "function", "function": obj}, obj))
|
|
187
|
+
|
|
188
|
+
except Exception as e:
|
|
189
|
+
logger.warning(f"Error importing custom tools: {str(e)}. Continuing without custom tools.")
|
|
190
|
+
|
|
147
191
|
@cl.on_chat_start
|
|
148
192
|
async def start():
|
|
149
193
|
initialize_db()
|
|
@@ -365,4 +409,6 @@ async def on_chat_resume(thread: ThreadDict):
|
|
|
365
409
|
cl.user_session.set("message_history", message_history)
|
|
366
410
|
|
|
367
411
|
# Reconnect to OpenAI realtime
|
|
368
|
-
await setup_openai_realtime()
|
|
412
|
+
await setup_openai_realtime()
|
|
413
|
+
|
|
414
|
+
|
|
@@ -552,6 +552,7 @@ class RealtimeClient(RealtimeEventHandler):
|
|
|
552
552
|
for key in self.tools
|
|
553
553
|
]
|
|
554
554
|
session = {**self.session_config, "tools": use_tools}
|
|
555
|
+
logger.debug(f"Updating session: {session}")
|
|
555
556
|
if self.realtime.is_connected():
|
|
556
557
|
await self.realtime.send("session.update", {"session": session})
|
|
557
558
|
return True
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
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
|
|
@@ -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=raZ-thG6SShb9kHjiBXMQbJWn10mBuycZxj6WDWfFa4,20105
|
|
7
|
-
praisonai/deploy.py,sha256=
|
|
7
|
+
praisonai/deploy.py,sha256=K8C3MghgeUf7ZfpQ1ax-AN0YJgdyCLDDEPbCI6vEe_U,6027
|
|
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
|
|
@@ -39,14 +39,14 @@ praisonai/ui/public/logo_dark.png,sha256=frHz1zkrnivGssJgk9iy1cabojkVgm8B4MllFwL
|
|
|
39
39
|
praisonai/ui/public/logo_light.png,sha256=8cQRti_Ysa30O3_7C3ku2w40LnVUUlUok47H-3ZZHSU,19656
|
|
40
40
|
praisonai/ui/public/movie.svg,sha256=aJ2EQ8vXZusVsF2SeuAVxP4RFJzQ14T26ejrGYdBgzk,1289
|
|
41
41
|
praisonai/ui/public/thriller.svg,sha256=2dYY72EcgbEyTxS4QzjAm37Y4srtPWEW4vCMFki98ZI,3163
|
|
42
|
-
praisonai/ui/realtime.py,sha256=
|
|
43
|
-
praisonai/ui/realtimeclient/__init__.py,sha256=
|
|
42
|
+
praisonai/ui/realtime.py,sha256=wdsKHQV0s9khDLndxWR_daXhC2pN875c2zji-oSpiQ4,15076
|
|
43
|
+
praisonai/ui/realtimeclient/__init__.py,sha256=zA2xa7rBUSw77wFkndJMQNNPqdH6ywQ3uf4WSYHjNfs,27513
|
|
44
44
|
praisonai/ui/realtimeclient/realtimedocs.txt,sha256=hmgd8Uwy2SkjSndyyF_-ZOaNxiyHwGaQLGc67DvV-sI,26395
|
|
45
45
|
praisonai/ui/realtimeclient/tools.py,sha256=IJOYwVOBW5Ocn5_iV9pFkmSKR3WU3YpX3kwF0I3jikQ,7855
|
|
46
46
|
praisonai/ui/sql_alchemy.py,sha256=kf025P_37C505YDDJZ-dPSmN_d62J2DCrkxbDAzXyrM,29884
|
|
47
47
|
praisonai/version.py,sha256=ugyuFliEqtAwQmH4sTlc16YXKYbFWDmfyk87fErB8-8,21
|
|
48
|
-
praisonai-0.1.
|
|
49
|
-
praisonai-0.1.
|
|
50
|
-
praisonai-0.1.
|
|
51
|
-
praisonai-0.1.
|
|
52
|
-
praisonai-0.1.
|
|
48
|
+
praisonai-0.1.2.dist-info/LICENSE,sha256=kqvFysVlnFxYOu0HxCe2HlmZmJtdmNGOxWRRkT9TsWc,1035
|
|
49
|
+
praisonai-0.1.2.dist-info/METADATA,sha256=qWGaa3C6aHaQ-BXQXxKEl2o9XEFeNfbIbT2tHH6UB1Y,12899
|
|
50
|
+
praisonai-0.1.2.dist-info/WHEEL,sha256=HBsDV7Hj4OTiS1GX6ua7iQXUQTB9UHftbBxr7Q8Xm9c,110
|
|
51
|
+
praisonai-0.1.2.dist-info/entry_points.txt,sha256=jB078LEGLY3Ky_indhclomRIVVpXrPSksHjJ-tcBZ-o,133
|
|
52
|
+
praisonai-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|