PraisonAI 0.1.0__tar.gz → 0.1.2__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.
- {praisonai-0.1.0 → praisonai-0.1.2}/PKG-INFO +12 -11
- {praisonai-0.1.0 → praisonai-0.1.2}/README.md +10 -10
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/deploy.py +1 -1
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/ui/realtime.py +47 -1
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/ui/realtimeclient/__init__.py +3 -0
- praisonai-0.1.2/praisonai/ui/realtimeclient/realtimedocs.txt +1484 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/ui/realtimeclient/tools.py +63 -20
- {praisonai-0.1.0 → praisonai-0.1.2}/pyproject.toml +3 -2
- {praisonai-0.1.0 → praisonai-0.1.2}/LICENSE +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/__init__.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/__main__.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/agents_generator.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/auto.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/chainlit_ui.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/cli.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/inbuilt_tools/__init__.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/inbuilt_tools/autogen_tools.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/inc/__init__.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/inc/config.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/inc/models.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/public/android-chrome-192x192.png +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/public/android-chrome-512x512.png +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/public/apple-touch-icon.png +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/public/fantasy.svg +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/public/favicon-16x16.png +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/public/favicon-32x32.png +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/public/favicon.ico +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/public/game.svg +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/public/logo_dark.png +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/public/logo_light.png +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/public/movie.svg +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/public/thriller.svg +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/setup/__init__.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/setup/build.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/setup/config.yaml +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/setup/post_install.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/setup/setup_conda_env.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/setup/setup_conda_env.sh +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/test.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/train.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/ui/chat.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/ui/code.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/ui/context.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/ui/public/fantasy.svg +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/ui/public/game.svg +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/ui/public/logo_dark.png +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/ui/public/logo_light.png +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/ui/public/movie.svg +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/ui/public/thriller.svg +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/ui/sql_alchemy.py +0 -0
- {praisonai-0.1.0 → praisonai-0.1.2}/praisonai/version.py +0 -0
|
@@ -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
|
|
@@ -25,6 +25,7 @@ Requires-Dist: aiosqlite (>=0.20.0) ; extra == "chat" or extra == "code" or extr
|
|
|
25
25
|
Requires-Dist: chainlit (==1.3.0rc1) ; extra == "ui" or extra == "chat" or extra == "code" or extra == "realtime"
|
|
26
26
|
Requires-Dist: crawl4ai (==0.3.4) ; extra == "chat" or extra == "code" or extra == "realtime"
|
|
27
27
|
Requires-Dist: crewai (>=0.32.0)
|
|
28
|
+
Requires-Dist: duckduckgo_search (>=6.3.0) ; extra == "realtime"
|
|
28
29
|
Requires-Dist: flask (>=3.0.0) ; extra == "api"
|
|
29
30
|
Requires-Dist: gradio (>=4.26.0) ; extra == "gradio"
|
|
30
31
|
Requires-Dist: greenlet (>=3.0.3) ; extra == "chat" or extra == "code" or extra == "realtime"
|
|
@@ -109,16 +110,16 @@ Praison AI, leveraging both AutoGen and CrewAI or any other agent framework, rep
|
|
|
109
110
|
|
|
110
111
|
## Key Features
|
|
111
112
|
|
|
112
|
-
- Automated AI Agents Creation
|
|
113
|
-
- Use CrewAI or AutoGen Framework
|
|
114
|
-
- 100+ LLM Support
|
|
115
|
-
- Chat with ENTIRE Codebase
|
|
116
|
-
- Interactive UIs
|
|
117
|
-
- YAML-based Configuration
|
|
118
|
-
- Custom Tool Integration
|
|
119
|
-
- Internet Search Capability (using Crawl4AI and Tavily)
|
|
120
|
-
- Vision Language Model (VLM) Support
|
|
121
|
-
- Real-time Voice Interaction
|
|
113
|
+
- 🤖 Automated AI Agents Creation
|
|
114
|
+
- 🔄 Use CrewAI or AutoGen Framework
|
|
115
|
+
- 💯 100+ LLM Support
|
|
116
|
+
- 💻 Chat with ENTIRE Codebase
|
|
117
|
+
- 🖥️ Interactive UIs
|
|
118
|
+
- 📄 YAML-based Configuration
|
|
119
|
+
- 🛠️ Custom Tool Integration
|
|
120
|
+
- 🔍 Internet Search Capability (using Crawl4AI and Tavily)
|
|
121
|
+
- 👁️ Vision Language Model (VLM) Support
|
|
122
|
+
- 🎙️ Real-time Voice Interaction
|
|
122
123
|
|
|
123
124
|
## TL;DR Multi Agents
|
|
124
125
|
|
|
@@ -61,16 +61,16 @@ Praison AI, leveraging both AutoGen and CrewAI or any other agent framework, rep
|
|
|
61
61
|
|
|
62
62
|
## Key Features
|
|
63
63
|
|
|
64
|
-
- Automated AI Agents Creation
|
|
65
|
-
- Use CrewAI or AutoGen Framework
|
|
66
|
-
- 100+ LLM Support
|
|
67
|
-
- Chat with ENTIRE Codebase
|
|
68
|
-
- Interactive UIs
|
|
69
|
-
- YAML-based Configuration
|
|
70
|
-
- Custom Tool Integration
|
|
71
|
-
- Internet Search Capability (using Crawl4AI and Tavily)
|
|
72
|
-
- Vision Language Model (VLM) Support
|
|
73
|
-
- Real-time Voice Interaction
|
|
64
|
+
- 🤖 Automated AI Agents Creation
|
|
65
|
+
- 🔄 Use CrewAI or AutoGen Framework
|
|
66
|
+
- 💯 100+ LLM Support
|
|
67
|
+
- 💻 Chat with ENTIRE Codebase
|
|
68
|
+
- 🖥️ Interactive UIs
|
|
69
|
+
- 📄 YAML-based Configuration
|
|
70
|
+
- 🛠️ Custom Tool Integration
|
|
71
|
+
- 🔍 Internet Search Capability (using Crawl4AI and Tavily)
|
|
72
|
+
- 👁️ Vision Language Model (VLM) Support
|
|
73
|
+
- 🎙️ Real-time Voice Interaction
|
|
74
74
|
|
|
75
75
|
## TL;DR Multi Agents
|
|
76
76
|
|
|
@@ -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
|
|
|
@@ -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
|
+
|
|
@@ -431,6 +431,8 @@ class RealtimeClient(RealtimeEventHandler):
|
|
|
431
431
|
self.dispatch("realtime.event", realtime_event)
|
|
432
432
|
|
|
433
433
|
def _on_session_created(self, event):
|
|
434
|
+
print(f"Session created: {event}")
|
|
435
|
+
logger.debug(f"Session created: {event}")
|
|
434
436
|
self.session_created = True
|
|
435
437
|
|
|
436
438
|
def _process_event(self, event, *args):
|
|
@@ -550,6 +552,7 @@ class RealtimeClient(RealtimeEventHandler):
|
|
|
550
552
|
for key in self.tools
|
|
551
553
|
]
|
|
552
554
|
session = {**self.session_config, "tools": use_tools}
|
|
555
|
+
logger.debug(f"Updating session: {session}")
|
|
553
556
|
if self.realtime.is_connected():
|
|
554
557
|
await self.realtime.send("session.update", {"session": session})
|
|
555
558
|
return True
|