-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update version to 2.2.14 across project files #513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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.13 gunicorn markdown | ||
| RUN pip install flask praisonai==2.2.14 gunicorn markdown | ||
| EXPOSE 8080 | ||
| CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,39 @@ | ||
| # tests/test_agents_playbook.py | ||
| import unittest | ||
| import subprocess | ||
| import pytest | ||
| import os | ||
| from praisonai import PraisonAI | ||
|
|
||
| class TestPraisonAIFramework(unittest.TestCase): | ||
|
|
||
| @pytest.mark.real | ||
| def test_main_with_autogen_framework(self): | ||
| """Test AutoGen framework integration with real API calls""" | ||
| # Check if we have a real API key | ||
| api_key = os.environ.get('OPENAI_API_KEY') | ||
| if not api_key or api_key == 'test-key' or api_key.startswith('sk-test-'): | ||
| self.skipTest("Skipping real test - no valid OPENAI_API_KEY provided") | ||
|
|
||
| praisonai = PraisonAI(agent_file='tests/autogen-agents.yaml') | ||
| try: | ||
| result = praisonai.run() | ||
| self.assertIn('### Task Output ###', result) | ||
| self.assertIn('### Output ###', result) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The assertion in What prompted this change in the expected output string for the AutoGen framework test?
Understanding the reason for this change is important to ensure the test is still correctly verifying the intended behavior and not masking an unintended side-effect. |
||
| except Exception as e: | ||
| if ('Invalid API Key' in str(e) or 'AuthenticationError' in str(e) or | ||
| 'InstructorRetryException' in str(e) or '401' in str(e)): | ||
| self.skipTest(f"Skipping due to API authentication: {e}") | ||
| else: | ||
| raise | ||
|
|
||
| @pytest.mark.real | ||
| def test_main_with_custom_framework(self): | ||
| """Test CrewAI framework integration with real API calls""" | ||
| # Check if we have a real API key | ||
| api_key = os.environ.get('OPENAI_API_KEY') | ||
| if not api_key or api_key == 'test-key' or api_key.startswith('sk-test-'): | ||
| self.skipTest("Skipping real test - no valid OPENAI_API_KEY provided") | ||
|
|
||
| praisonai = PraisonAI(agent_file='tests/crewai-agents.yaml') | ||
| try: | ||
| result = praisonai.run() | ||
|
|
@@ -28,7 +45,14 @@ def test_main_with_custom_framework(self): | |
| else: | ||
| raise | ||
|
|
||
| @pytest.mark.real | ||
| def test_main_with_internet_search_tool(self): | ||
| """Test internet search tool integration with real API calls""" | ||
| # Check if we have a real API key | ||
| api_key = os.environ.get('OPENAI_API_KEY') | ||
| if not api_key or api_key == 'test-key' or api_key.startswith('sk-test-'): | ||
| self.skipTest("Skipping real test - no valid OPENAI_API_KEY provided") | ||
|
|
||
| praisonai = PraisonAI(agent_file='tests/search-tool-agents.yaml') | ||
| try: | ||
| result = praisonai.run() | ||
|
|
@@ -40,7 +64,14 @@ def test_main_with_internet_search_tool(self): | |
| else: | ||
| raise | ||
|
|
||
| @pytest.mark.real | ||
| def test_main_with_built_in_tool(self): | ||
| """Test built-in tool integration with real API calls""" | ||
| # Check if we have a real API key | ||
| api_key = os.environ.get('OPENAI_API_KEY') | ||
| if not api_key or api_key == 'test-key' or api_key.startswith('sk-test-'): | ||
| self.skipTest("Skipping real test - no valid OPENAI_API_KEY provided") | ||
|
|
||
| praisonai = PraisonAI(agent_file='tests/inbuilt-tool-agents.yaml') | ||
| try: | ||
| result = praisonai.run() | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line
'openai_api_key': api_key, # AutoGen sometimes expects this field namewas removed. The comment suggests this key might be important for AutoGen compatibility.Could you clarify the reason for this removal?
openai_api_keyfield, and that the existingapi_keyfield is now universally sufficient?Given the PR's focus on versioning, this change seems out of scope unless it's a necessary cleanup tied to version 2.2.14. Ensuring backward compatibility or clearly documenting such breaking changes is important.