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
7 changes: 7 additions & 0 deletions .github/workflows/test-extended.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ jobs:
uv pip install --system ."[ui,gradio,api,agentops,google,openai,anthropic,cohere,chat,code,realtime,call,crewai,autogen]"
uv pip install --system duckduckgo_search

- name: Set environment variables
run: |
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> $GITHUB_ENV
echo "OPENAI_API_BASE=${{ secrets.OPENAI_API_BASE }}" >> $GITHUB_ENV
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME }}" >> $GITHUB_ENV
echo "PYTHONPATH=${{ github.workspace }}/src/praisonai-agents:$PYTHONPATH" >> $GITHUB_ENV

- name: Test Key Example Scripts
run: |
echo "🧪 Testing key example scripts from praisonai-agents..."
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Run Fast Tests
run: |
# Run the fastest, most essential tests
python tests/test_runner.py --fast
python tests/test_runner.py --pattern fast
- name: Run Legacy Example Tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.11-slim
WORKDIR /app
COPY . .
RUN pip install flask praisonai==2.2.3 gunicorn markdown
RUN pip install flask praisonai==2.2.4 gunicorn markdown
EXPOSE 8080
CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]
2 changes: 1 addition & 1 deletion docker/Dockerfile.chat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN pip install --no-cache-dir \
praisonaiagents>=0.0.4 \
praisonai_tools \
"praisonai==2.2.3" \
"praisonai==2.2.4" \
"praisonai[chat]" \
"embedchain[github,youtube]"

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN pip install --no-cache-dir \
praisonaiagents>=0.0.4 \
praisonai_tools \
"praisonai==2.2.3" \
"praisonai==2.2.4" \
"praisonai[ui]" \
"praisonai[chat]" \
"praisonai[realtime]" \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.ui
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN pip install --no-cache-dir \
praisonaiagents>=0.0.4 \
praisonai_tools \
"praisonai==2.2.3" \
"praisonai==2.2.4" \
"praisonai[ui]" \
"praisonai[crewai]"

Expand Down
2 changes: 1 addition & 1 deletion docs/api/praisonai/deploy.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h2 id="raises">Raises</h2>
file.write(&#34;FROM python:3.11-slim\n&#34;)
file.write(&#34;WORKDIR /app\n&#34;)
file.write(&#34;COPY . .\n&#34;)
file.write(&#34;RUN pip install flask praisonai==2.2.3 gunicorn markdown\n&#34;)
file.write(&#34;RUN pip install flask praisonai==2.2.4 gunicorn markdown\n&#34;)
file.write(&#34;EXPOSE 8080\n&#34;)
file.write(&#39;CMD [&#34;gunicorn&#34;, &#34;-b&#34;, &#34;0.0.0.0:8080&#34;, &#34;api:app&#34;]\n&#39;)

Expand Down
2 changes: 1 addition & 1 deletion docs/developers/local-development.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ WORKDIR /app

COPY . .

RUN pip install flask praisonai==2.2.3 watchdog
RUN pip install flask praisonai==2.2.4 watchdog

EXPOSE 5555

Expand Down
2 changes: 1 addition & 1 deletion docs/ui/chat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ To facilitate local development with live reload, you can use Docker. Follow the

COPY . .

RUN pip install flask praisonai==2.2.3 watchdog
RUN pip install flask praisonai==2.2.4 watchdog

EXPOSE 5555

Expand Down
2 changes: 1 addition & 1 deletion docs/ui/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ To facilitate local development with live reload, you can use Docker. Follow the

COPY . .

RUN pip install flask praisonai==2.2.3 watchdog
RUN pip install flask praisonai==2.2.4 watchdog

EXPOSE 5555

Expand Down
2 changes: 1 addition & 1 deletion praisonai/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def run(self):
"""
Run the PraisonAI application.
"""
self.main()
return self.main()
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.

medium

This change alters the return value of the run method to be whatever self.main() returns. Previously, run implicitly returned None. Is the intention here to allow the caller of run (e.g., __main__.py) to capture the output of commands like auto or direct prompts? Please confirm if this change in behavior is intended.

return self.main()


def main(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion praisonai/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def create_dockerfile(self):
file.write("FROM python:3.11-slim\n")
file.write("WORKDIR /app\n")
file.write("COPY . .\n")
file.write("RUN pip install flask praisonai==2.2.3 gunicorn markdown\n")
file.write("RUN pip install flask praisonai==2.2.4 gunicorn markdown\n")
file.write("EXPOSE 8080\n")
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "PraisonAI"
version = "2.2.3"
version = "2.2.4"
description = "PraisonAI is an AI Agents Framework with Self Reflection. PraisonAI application combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration."
readme = "README.md"
license = ""
Expand Down Expand Up @@ -89,7 +89,7 @@ autogen = ["pyautogen>=0.2.19", "praisonai-tools>=0.0.15", "crewai"]

[tool.poetry]
name = "PraisonAI"
version = "2.2.3"
version = "2.2.4"
description = "PraisonAI is an AI Agents Framework with Self Reflection. PraisonAI application combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration."
authors = ["Mervin Praison"]
license = ""
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/test_base_url_api_base_fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,19 @@ def test_agent_with_llm_dict_base_url_parameter(self, mock_completion):

@patch('litellm.image_generation')
def test_image_agent_base_url_consistency(self, mock_image_generation):
"""Test that ImageAgent maintains parameter consistency with base_url."""
"""Test that ImageAgent maintains parameter consistency with api_base."""
mock_image_generation.return_value = {
'data': [{'url': 'http://example.com/image.png'}]
}

image_agent = ImageAgent(
base_url='http://localhost:4000',
api_base='http://localhost:4000',
api_key='sk-test'
)

# Verify that ImageAgent was created with base_url
assert image_agent.base_url == 'http://localhost:4000'
assert image_agent.api_key == 'sk-test'
# Verify that ImageAgent was created with api_base
assert image_agent.image_config.api_base == 'http://localhost:4000'
assert image_agent.image_config.api_key == 'sk-test'

@patch('litellm.completion')
def test_koboldcpp_specific_scenario(self, mock_completion):
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/test_mcp_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ async def test_mcp_server_connection(self):
mock_session = AsyncMock()
mock_session_class.return_value.__aenter__.return_value = mock_session

# Mock session methods
# Mock tool listing
mock_session.initialize.return_value = None
mock_session.list_tools.return_value = Mock(tools=[
Mock(name='get_stock_price', description='Get stock price')
])
mock_tool = Mock()
mock_tool.name = 'get_stock_price' # Set as string, not Mock
mock_session.list_tools.return_value = Mock(tools=[mock_tool])

# Test MCP connection simulation
async with mock_stdio_client(Mock()) as (read, write):
Expand Down
16 changes: 11 additions & 5 deletions tests/integration/test_rag_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,14 +395,20 @@ def test_rag_knowledge_update(self, sample_agent_config):
def mock_update_knowledge(agent, new_documents: list, mode: str = "append"):
"""Mock updating agent knowledge."""
if mode == "append":
current_knowledge = getattr(agent, 'knowledge', [])
updated_knowledge = current_knowledge + new_documents
current_knowledge = getattr(agent, 'knowledge', None)
if current_knowledge is not None:
# If Knowledge object exists, get count from it
previous_count = 1 # Mock that there's existing knowledge
else:
previous_count = 0
updated_count = previous_count + len(new_documents)
else: # replace
updated_knowledge = new_documents
previous_count = 1 if getattr(agent, 'knowledge', None) else 0
updated_count = len(new_documents)

return {
'previous_count': len(getattr(agent, 'knowledge', [])),
'new_count': len(updated_knowledge),
'previous_count': previous_count,
'new_count': updated_count,
'added_documents': new_documents
}

Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading