Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ RUN pip install --no-cache-dir \
flask \
"praisonai>=2.2.19" \
"praisonai[api]" \
praisonaiagents>=0.0.92 \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The praisonaiagents package has been removed from the pip install command here and in other Dockerfiles (Dockerfile.chat, Dockerfile.dev, Dockerfile.ui).

Could you clarify how the functionality previously provided by praisonaiagents is now integrated or made available?

Concerns:

  1. The file src/praisonai/praisonai/auto.py (part of the main praisonai package) attempts to import praisonaiagents as a top-level module:
    from praisonaiagents import Agent as PraisonAgent, Task as PraisonTask, PraisonAIAgents
  2. Unit tests like src/praisonai/tests/unit/test_core_agents.py also import praisonaiagents and use sys.path.insert to find a local praisonai-agents source directory, suggesting it's treated as a distinct module.

If praisonaiagents is no longer installed via pip:

  • Has its functionality been merged into the praisonai pip package (version >=2.2.19) such that from praisonaiagents import ... still works or should be changed to something like from praisonai.submodule import ...?
  • If it's intended to be used from a source directory (e.g., src/praisonai-agents/ copied into /app/src/praisonai-agents/), is this path correctly added to PYTHONPATH in the final production Docker images to ensure it's importable by the application code (like auto.py)? The development Docker Compose (docker-compose.dev.yml) sets PYTHONPATH: /app/src, but this might not be the case for production images.

This could lead to an ImportError at runtime if not handled correctly.

gunicorn \
markdown

Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile.chat
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ RUN mkdir -p /root/.praison

# Install Python packages (using latest versions)
RUN pip install --no-cache-dir \
praisonaiagents>=0.0.92 \
praisonai_tools \
"praisonai>=2.2.19" \
"praisonai[chat]" \
Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ RUN mkdir -p /root/.praison

# Install Python packages (using latest versions)
RUN pip install --no-cache-dir \
praisonaiagents>=0.0.92 \
praisonai_tools \
"praisonai>=2.2.19" \
"praisonai[ui]" \
Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile.ui
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ RUN mkdir -p /root/.praison

# Install Python packages (using latest versions)
RUN pip install --no-cache-dir \
praisonaiagents>=0.0.92 \
praisonai_tools \
"praisonai>=2.2.19" \
"praisonai[ui]" \
Expand Down
7 changes: 5 additions & 2 deletions src/praisonai/tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_main_with_internet_search_tool(self):

@pytest.mark.real
def test_main_with_built_in_tool(self):
praisonai = PraisonAI(agent_file="tests/built-in-tools-agents.yaml")
praisonai = PraisonAI(agent_file="tests/inbuilt-tool-agents.yaml")
result = praisonai.run()
print(f"Result: {result}")
self.assertIsNotNone(result)
Expand Down Expand Up @@ -77,7 +77,10 @@ def test_praisonai_init_command(self):
command = "praisonai --framework autogen --init \"create a 2-agent team to write a simple python game\""
result = self.run_command(command)
print(f"Result: {result}")
self.assertIn('created successfully', result)
# Check for success indicator in the output
success_phrases = ['created successfully', 'agents.yaml created', 'File created']
found_success = any(phrase in result for phrase in success_phrases)
self.assertTrue(found_success, f"No success message found. Expected one of {success_phrases}. Last 1000 chars: {result[-1000:]}")

class TestExamples(unittest.TestCase):
def test_advanced_example(self):
Expand Down
5 changes: 2 additions & 3 deletions src/praisonai/tests/unit/test_database_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@

import sys
import os
sys.path.insert(0, 'src/praisonai/praisonai/ui')

# Test the database_config module
from database_config import should_force_sqlite, get_database_url_with_sqlite_override, get_database_config_for_sqlalchemy
# Import from the proper module path
from praisonai.ui.database_config import should_force_sqlite, get_database_url_with_sqlite_override, get_database_config_for_sqlalchemy

def test_database_config():
print("Testing database_config utilities...")
Expand Down
Loading