mirror of
https://github.com/MervinPraison/PraisonAI.git
synced 2026-11-07 17:33:33 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f91918f4f6 | ||
|
|
ee21df9a6a | ||
|
|
c9159337fa | ||
|
|
2258685c32 | ||
|
|
7210788135 |
No files matched your search
+1
-1
@@ -16,7 +16,7 @@ RUN mkdir -p /root/.praison
|
||||
# Install Python packages (using latest versions)
|
||||
RUN pip install --no-cache-dir \
|
||||
flask \
|
||||
"praisonai>=2.2.84" \
|
||||
"praisonai>=2.2.87" \
|
||||
"praisonai[api]" \
|
||||
gunicorn \
|
||||
markdown
|
||||
|
||||
@@ -16,7 +16,7 @@ RUN mkdir -p /root/.praison
|
||||
# Install Python packages (using latest versions)
|
||||
RUN pip install --no-cache-dir \
|
||||
praisonai_tools \
|
||||
"praisonai>=2.2.84" \
|
||||
"praisonai>=2.2.87" \
|
||||
"praisonai[chat]" \
|
||||
"embedchain[github,youtube]"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ RUN mkdir -p /root/.praison
|
||||
# Install Python packages (using latest versions)
|
||||
RUN pip install --no-cache-dir \
|
||||
praisonai_tools \
|
||||
"praisonai>=2.2.84" \
|
||||
"praisonai>=2.2.87" \
|
||||
"praisonai[ui]" \
|
||||
"praisonai[chat]" \
|
||||
"praisonai[realtime]" \
|
||||
|
||||
@@ -16,7 +16,7 @@ RUN mkdir -p /root/.praison
|
||||
# Install Python packages (using latest versions)
|
||||
RUN pip install --no-cache-dir \
|
||||
praisonai_tools \
|
||||
"praisonai>=2.2.84" \
|
||||
"praisonai>=2.2.87" \
|
||||
"praisonai[ui]" \
|
||||
"praisonai[crewai]"
|
||||
|
||||
|
||||
+2
-2
@@ -121,7 +121,7 @@ healthcheck:
|
||||
## 📦 Package Versions
|
||||
|
||||
All Docker images use consistent, up-to-date versions:
|
||||
- PraisonAI: `>=2.2.84`
|
||||
- PraisonAI: `>=2.2.87`
|
||||
- PraisonAI Agents: `>=0.0.92`
|
||||
- Python: `3.11-slim`
|
||||
|
||||
@@ -218,7 +218,7 @@ docker-compose up -d
|
||||
### Version Pinning
|
||||
To use specific versions, update the Dockerfile:
|
||||
```dockerfile
|
||||
RUN pip install "praisonai==2.2.84" "praisonaiagents==0.0.92"
|
||||
RUN pip install "praisonai==2.2.87" "praisonaiagents==0.0.92"
|
||||
```
|
||||
|
||||
## 🌐 Production Deployment
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
" - Property comparison\n",
|
||||
" - Cost of living and taxes\n",
|
||||
" - First-time homebuyer guidance\n",
|
||||
"llm: gpt-4o\n",
|
||||
"llm: gpt-5-nano\n",
|
||||
"verbosity: true\n",
|
||||
"format: markdown\n",
|
||||
"\"\"\"\n"
|
||||
@@ -188,7 +188,7 @@
|
||||
"Help users evaluate neighborhoods, estimate mortgage payments, compare homes, and understand homeownership costs.\n",
|
||||
"Explain clearly, format in markdown, and be friendly but professional.\n",
|
||||
"\"\"\",\n",
|
||||
" llm=\"gpt-4o\",\n",
|
||||
" llm=\"gpt-5-nano\",\n",
|
||||
" verbose=True,\n",
|
||||
" markdown=True\n",
|
||||
")\n"
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #008080; text-decoration-color: #008080\">╭───────────────────────────────────────────────────── Task ──────────────────────────────────────────────────────╮</span>\n",
|
||||
"<span style=\"color: #008080; text-decoration-color: #008080\">│</span> You are an expert health advisor using the GPT-4o Mini model. <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
|
||||
"<span style=\"color: #008080; text-decoration-color: #008080\">│</span> You are an expert health advisor using the gpt-5-nano Mini model. <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
|
||||
"<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
|
||||
"<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"background-color: #272822\"> </span> <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
|
||||
"<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"background-color: #272822\"> </span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">Based on the following air quality conditions in Mumbai, Maharashtra, India:</span><span style=\"background-color: #272822\"> </span> <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
|
||||
@@ -340,7 +340,7 @@
|
||||
],
|
||||
"text/plain": [
|
||||
"\u001b[36m╭─\u001b[0m\u001b[36m────────────────────────────────────────────────────\u001b[0m\u001b[36m Task \u001b[0m\u001b[36m─────────────────────────────────────────────────────\u001b[0m\u001b[36m─╮\u001b[0m\n",
|
||||
"\u001b[36m│\u001b[0m You are an expert health advisor using the GPT-4o Mini model. \u001b[36m│\u001b[0m\n",
|
||||
"\u001b[36m│\u001b[0m You are an expert health advisor using the gpt-5-nano Mini model. \u001b[36m│\u001b[0m\n",
|
||||
"\u001b[36m│\u001b[0m \u001b[36m│\u001b[0m\n",
|
||||
"\u001b[36m│\u001b[0m \u001b[48;2;39;40;34m \u001b[0m \u001b[36m│\u001b[0m\n",
|
||||
"\u001b[36m│\u001b[0m \u001b[48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mBased on the following air quality conditions in Mumbai, Maharashtra, India:\u001b[0m\u001b[48;2;39;40;34m \u001b[0m\u001b[48;2;39;40;34m \u001b[0m \u001b[36m│\u001b[0m\n",
|
||||
@@ -519,7 +519,7 @@
|
||||
" aqi_data = aqi_data.data # Convert to dict\n",
|
||||
"\n",
|
||||
" prompt = f\"\"\"\n",
|
||||
" You are an expert health advisor using the GPT-4o Mini model.\n",
|
||||
" You are an expert health advisor using the gpt-5-nano Mini model.\n",
|
||||
"\n",
|
||||
" Based on the following air quality conditions in {user_city}, {user_state}, {user_country}:\n",
|
||||
" - Overall AQI: {aqi_data.get('aqi', 'N/A')}\n",
|
||||
|
||||
+2
-2
@@ -152,7 +152,7 @@
|
||||
" - Evaluate risk factors\n",
|
||||
" - Identify scams or red flags\n",
|
||||
" - Summarize project fundamentals\n",
|
||||
"llm: gpt-4o\n",
|
||||
"llm: gpt-5-nano\n",
|
||||
"verbosity: true\n",
|
||||
"format: markdown\n",
|
||||
"\"\"\"\n"
|
||||
@@ -184,7 +184,7 @@
|
||||
"and market trends. Provide critical insight into legitimacy, potential growth, and associated risks.\n",
|
||||
"Use markdown formatting and structure your research clearly.\n",
|
||||
"\"\"\",\n",
|
||||
" llm=\"gpt-4o\",\n",
|
||||
" llm=\"gpt-5-nano\",\n",
|
||||
" verbose=True,\n",
|
||||
" markdown=True\n",
|
||||
")\n"
|
||||
|
||||
@@ -627,7 +627,7 @@
|
||||
" )\n",
|
||||
" else: # OpenAI\n",
|
||||
" llm = ChatOpenAI(\n",
|
||||
" model=\"gpt-4o\",\n",
|
||||
" model=\"gpt-5-nano\",\n",
|
||||
" api_key=api_key,\n",
|
||||
" temperature=0.0\n",
|
||||
" )\n",
|
||||
|
||||
+2
-2
@@ -153,7 +153,7 @@
|
||||
" - Spot content patterns and trends\n",
|
||||
" - Recommend growth strategies\n",
|
||||
" - Detect potential monetization methods\n",
|
||||
"llm: gpt-4o\n",
|
||||
"llm: gpt-5-nano\n",
|
||||
"verbosity: true\n",
|
||||
"format: markdown\n",
|
||||
"\"\"\"\n"
|
||||
@@ -184,7 +184,7 @@
|
||||
"You are a YouTube intelligence analyst. Your job is to research a specific channel, niche, or influencer topic.\n",
|
||||
"Provide growth recommendations, engagement analysis, trending strategies, and monetization tips. Format in markdown.\n",
|
||||
"\"\"\",\n",
|
||||
" llm=\"gpt-4o\",\n",
|
||||
" llm=\"gpt-5-nano\",\n",
|
||||
" verbose=True,\n",
|
||||
" markdown=True\n",
|
||||
")\n"
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"{'name': 'Travel Research Agent', 'description': 'A world-class travel researcher that searches for destinations, activities, and accommodations', 'instructions': ['Given a travel destination and number of days, generate 3 relevant search terms', 'Search the web for each term using web_search tool', 'Analyze results and return 10 most relevant findings', 'Focus on activities, accommodations, attractions, and local insights', 'Ensure high-quality, accurate information', 'Use travel_budget_calculator to estimate costs'], 'tools': ['web_search', 'travel_budget_calculator'], 'model': 'gpt-4o', 'temperature': 0.7}\n"
|
||||
"{'name': 'Travel Research Agent', 'description': 'A world-class travel researcher that searches for destinations, activities, and accommodations', 'instructions': ['Given a travel destination and number of days, generate 3 relevant search terms', 'Search the web for each term using web_search tool', 'Analyze results and return 10 most relevant findings', 'Focus on activities, accommodations, attractions, and local insights', 'Ensure high-quality, accurate information', 'Use travel_budget_calculator to estimate costs'], 'tools': ['web_search', 'travel_budget_calculator'], 'model': 'gpt-5-nano', 'temperature': 0.7}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -156,7 +156,7 @@
|
||||
"tools:\n",
|
||||
" - web_search\n",
|
||||
" - travel_budget_calculator\n",
|
||||
"model: gpt-4o\n",
|
||||
"model: gpt-5-nano\n",
|
||||
"temperature: 0.7\n",
|
||||
"\"\"\"\n",
|
||||
"\n",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"id": "Y9FkDzt1lF47"
|
||||
},
|
||||
"source": [
|
||||
"This notebook implements a conversational restaurant booking assistant using the Praison AI Agent framework. It handles natural interruptions such as modifying guest count or changing time mid-conversation. Built for Google Colab Free Tier, it uses OpenAI's GPT-4o model and follows a YAML-based agent design for clarity and modularity."
|
||||
"This notebook implements a conversational restaurant booking assistant using the Praison AI Agent framework. It handles natural interruptions such as modifying guest count or changing time mid-conversation. Built for Google Colab Free Tier, it uses OpenAI's gpt-5-nano model and follows a YAML-based agent design for clarity and modularity."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -135,7 +135,7 @@
|
||||
" - Context management\n",
|
||||
" - Handling mid-conversation changes\n",
|
||||
" - Summarizing confirmed reservations\n",
|
||||
"llm: gpt-4o\n",
|
||||
"llm: gpt-5-nano\n",
|
||||
"verbosity: true\n",
|
||||
"format: markdown\n",
|
||||
"\"\"\"\n"
|
||||
@@ -167,7 +167,7 @@
|
||||
"manage corrections like “change to 3 guests” or “move to 8 PM,”\n",
|
||||
"confirm the details once the user is satisfied. Respond in markdown.\n",
|
||||
"\"\"\",\n",
|
||||
" llm=\"gpt-4o\",\n",
|
||||
" llm=\"gpt-5-nano\",\n",
|
||||
" verbose=True,\n",
|
||||
" markdown=True\n",
|
||||
")\n"
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
"text": [
|
||||
"\u001b[95m \n",
|
||||
"\n",
|
||||
"[{'title': 'CrewAI uses third-party models to automate business tasks', 'href': 'https://techcrunch.com/2024/10/22/crewai-uses-third-party-models-to-automate-business-tasks/', 'body': 'CrewAI, a startup developing a hub where companies can build automations using third-party AI models, has raised $18 million from investors including Andrew Ng. ... 4:00 AM PDT · October 22, 2024 ...'}, {'title': 'CrewAI Launches Multi-Agentic Platform to Deliver on the Promise of ...', 'href': 'https://markets.businessinsider.com/news/stocks/crewai-launches-multi-agentic-platform-to-deliver-on-the-promise-of-generative-ai-for-enterprise-1033870246?op=1', 'body': 'SAN FRANCISCO and SÃO PAULO, Oct. 22, 2024 (GLOBE NEWSWIRE) -- CrewAI, a leading multi-agent platform, today announced $18 million in total funding that included an inception round led by ...'}, {'title': 'Agentic AI startup CrewAI closes $18M funding round', 'href': 'https://siliconangle.com/2024/10/22/agentic-ai-startup-crewai-closes-18m-funding-round/', 'body': \"An e-commerce company, for example, could create an agent that uses GPT-4o to generate shopping advice based on customers' past purchases. CrewAI has created an open-source framework of the same ...\"}, {'title': 'CrewAI Company Profile 2024: Valuation, Funding & Investors - PitchBook', 'href': 'https://pitchbook.com/profiles/company/590845-78', 'body': \"Explore institutional-grade private market research from our team of analysts. ... Artificial Intelligence & Machine Learning; Artificial Intelligence & Machine Learning Report. September 19, 2024. CrewAI Executive Team (2) Update this profile Name ... CrewAI's primary industry is Business/Productivity Software. Is CrewAI a private or public ...\"}, {'title': 'CrewAI - Autonomous AI Agents in action for a market ... - LinkedIn', 'href': 'https://www.linkedin.com/pulse/crewai-autonomous-ai-agents-action-market-research-task-kithion-ovnrc', 'body': 'The will provide a detailed market trends report, the will generate a comprehensive analysis of top competitors, and the will develop a thorough marketing plan. Conclusion. CrewAI, combined with ...'}]\n",
|
||||
"[{'title': 'CrewAI uses third-party models to automate business tasks', 'href': 'https://techcrunch.com/2024/10/22/crewai-uses-third-party-models-to-automate-business-tasks/', 'body': 'CrewAI, a startup developing a hub where companies can build automations using third-party AI models, has raised $18 million from investors including Andrew Ng. ... 4:00 AM PDT · October 22, 2024 ...'}, {'title': 'CrewAI Launches Multi-Agentic Platform to Deliver on the Promise of ...', 'href': 'https://markets.businessinsider.com/news/stocks/crewai-launches-multi-agentic-platform-to-deliver-on-the-promise-of-generative-ai-for-enterprise-1033870246?op=1', 'body': 'SAN FRANCISCO and SÃO PAULO, Oct. 22, 2024 (GLOBE NEWSWIRE) -- CrewAI, a leading multi-agent platform, today announced $18 million in total funding that included an inception round led by ...'}, {'title': 'Agentic AI startup CrewAI closes $18M funding round', 'href': 'https://siliconangle.com/2024/10/22/agentic-ai-startup-crewai-closes-18m-funding-round/', 'body': \"An e-commerce company, for example, could create an agent that uses gpt-5-nano to generate shopping advice based on customers' past purchases. CrewAI has created an open-source framework of the same ...\"}, {'title': 'CrewAI Company Profile 2024: Valuation, Funding & Investors - PitchBook', 'href': 'https://pitchbook.com/profiles/company/590845-78', 'body': \"Explore institutional-grade private market research from our team of analysts. ... Artificial Intelligence & Machine Learning; Artificial Intelligence & Machine Learning Report. September 19, 2024. CrewAI Executive Team (2) Update this profile Name ... CrewAI's primary industry is Business/Productivity Software. Is CrewAI a private or public ...\"}, {'title': 'CrewAI - Autonomous AI Agents in action for a market ... - LinkedIn', 'href': 'https://www.linkedin.com/pulse/crewai-autonomous-ai-agents-action-market-research-task-kithion-ovnrc', 'body': 'The will provide a detailed market trends report, the will generate a comprehensive analysis of top competitors, and the will develop a thorough marketing plan. Conclusion. CrewAI, combined with ...'}]\n",
|
||||
"\u001b[00m\n",
|
||||
"\u001b[32;1m\u001b[1;3mThought: I have found more information about CrewAI's target customers and market positioning. CrewAI is a startup that has developed a hub where companies can build automations using third-party AI models, and it has recently raised $18 million in funding. Their target customers are likely businesses looking to automate complex tasks and improve efficiency using AI. They are positioned as a platform for deploying and managing AI agents to automate a variety of tasks.\n",
|
||||
"\n",
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
" url=url,\n",
|
||||
" word_count_threshold=1,\n",
|
||||
" extraction_strategy= LLMExtractionStrategy(\n",
|
||||
" provider=\"openai/gpt-4o\",\n",
|
||||
" provider=\"openai/gpt-5-nano\",\n",
|
||||
" api_token=os.getenv('OPENAI_API_KEY'),\n",
|
||||
" schema=ModelFee.schema(),\n",
|
||||
" extraction_type=\"schema\",\n",
|
||||
|
||||
@@ -46,7 +46,7 @@ agent = RouterAgent(
|
||||
name="Smart Assistant",
|
||||
role="Adaptive AI Assistant",
|
||||
goal="Complete tasks using the most appropriate model",
|
||||
models=["gpt-5-nano", "gpt-4o", "claude-3-5-sonnet-20241022"],
|
||||
models=["gpt-5-nano", "gpt-5-nano", "claude-3-5-sonnet-20241022"],
|
||||
routing_strategy="auto" # Automatic model selection
|
||||
)
|
||||
|
||||
@@ -133,7 +133,7 @@ The system includes pre-configured profiles for popular models:
|
||||
| gpt-5-nano | OpenAI | Simple tasks, speed | $0.00075 |
|
||||
| gemini-1.5-flash | Google | Cost-effective, multimodal | $0.000125 |
|
||||
| claude-3-haiku | Anthropic | Fast responses | $0.0008 |
|
||||
| gpt-4o | OpenAI | General purpose | $0.0075 |
|
||||
| gpt-5-nano | OpenAI | General purpose | $0.0075 |
|
||||
| claude-3-5-sonnet-20241022 | Anthropic | Complex reasoning | $0.009 |
|
||||
| deepseek-chat | DeepSeek | Code & math | $0.0014 |
|
||||
|
||||
@@ -161,7 +161,7 @@ print(report)
|
||||
'routing_strategy': 'auto',
|
||||
'model_usage': {
|
||||
'gpt-5-nano': {'calls': 5, 'tokens': 1500, 'cost': 0.0011},
|
||||
'gpt-4o': {'calls': 2, 'tokens': 3000, 'cost': 0.0225}
|
||||
'gpt-5-nano': {'calls': 2, 'tokens': 3000, 'cost': 0.0225}
|
||||
},
|
||||
'total_cost_estimate': 0.0236,
|
||||
'total_calls': 7
|
||||
@@ -207,7 +207,7 @@ for i, agent in enumerate(auto.agents):
|
||||
name=agent.name,
|
||||
role=agent.role,
|
||||
goal=agent.goal,
|
||||
models=["gpt-5-nano", "gpt-4o", "claude-3-5-sonnet"],
|
||||
models=["gpt-5-nano", "gpt-5-nano", "claude-3-5-sonnet"],
|
||||
routing_strategy="auto"
|
||||
)
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ def example_auto_routing():
|
||||
role="Adaptive Research Assistant",
|
||||
goal="Research topics using the most appropriate AI model",
|
||||
backstory="I analyze task complexity and route to the best model",
|
||||
models=["gpt-5-nano", "gpt-4o", "claude-3-5-sonnet-20241022"],
|
||||
models=["gpt-5-nano", "gpt-5-nano", "claude-3-5-sonnet-20241022"],
|
||||
routing_strategy="auto", # Automatic model selection
|
||||
verbose=True
|
||||
)
|
||||
@@ -95,7 +95,7 @@ def example_cost_optimized_workflow():
|
||||
goal="Create high-quality content",
|
||||
models={
|
||||
"claude-3-5-sonnet-20241022": {},
|
||||
"gpt-4o": {}
|
||||
"gpt-5-nano": {}
|
||||
},
|
||||
routing_strategy="performance-optimized", # Prefer better models
|
||||
verbose=True
|
||||
@@ -158,7 +158,7 @@ def example_auto_agents_multi_provider():
|
||||
goal=agent.goal,
|
||||
backstory=agent.backstory,
|
||||
tools=agent.tools,
|
||||
models=["gpt-5-nano", "gemini/gemini-1.5-flash", "claude-3-haiku-20240307", "gpt-4o"],
|
||||
models=["gpt-5-nano", "gemini/gemini-1.5-flash", "claude-3-haiku-20240307", "gpt-5-nano"],
|
||||
routing_strategy="auto",
|
||||
verbose=True
|
||||
)
|
||||
@@ -192,7 +192,7 @@ def example_custom_routing():
|
||||
# Create custom model profiles for specific use cases
|
||||
custom_models = [
|
||||
ModelProfile(
|
||||
name="gpt-4o",
|
||||
name="gpt-5-nano",
|
||||
provider="openai",
|
||||
complexity_range=(TaskComplexity.SIMPLE, TaskComplexity.VERY_COMPLEX),
|
||||
cost_per_1k_tokens=0.0075,
|
||||
|
||||
@@ -19,7 +19,7 @@ from praisonaiagents.tools import duckduckgo
|
||||
# Define model options with cost considerations
|
||||
# Using different models for different complexity levels
|
||||
cheap_model = "gpt-5-nano" # For simple tasks
|
||||
balanced_model = "gpt-4o" # For moderate complexity
|
||||
balanced_model = "gpt-5-nano" # For moderate complexity
|
||||
premium_model = "claude-3-5-sonnet-20241022" # For complex tasks
|
||||
|
||||
# Create RouterAgent with cost optimization strategy
|
||||
@@ -77,6 +77,6 @@ print("COST OPTIMIZATION ROUTER DEMONSTRATION COMPLETED")
|
||||
print("="*80)
|
||||
print("The RouterAgent automatically selected appropriate models based on task complexity:")
|
||||
print("- Simple factual questions → Cheaper model (gpt-5-nano)")
|
||||
print("- Moderate analysis tasks → Balanced model (gpt-4o)")
|
||||
print("- Moderate analysis tasks → Balanced model (gpt-5-nano)")
|
||||
print("- Complex strategic analysis → Premium model (claude-3-5-sonnet)")
|
||||
print("- This approach optimizes costs while maintaining quality for each task type")
|
||||
@@ -127,9 +127,9 @@ def main():
|
||||
verbose=True,
|
||||
allow_delegation=False,
|
||||
tools=[internet_search_tool],
|
||||
llm="gpt-4o",
|
||||
llm="gpt-5-nano",
|
||||
markdown=True,
|
||||
reflect_llm="gpt-4o",
|
||||
reflect_llm="gpt-5-nano",
|
||||
min_reflect=2,
|
||||
max_reflect=4
|
||||
)
|
||||
@@ -142,7 +142,7 @@ def main():
|
||||
making complex tech topics interesting and easy to understand.""",
|
||||
verbose=True,
|
||||
allow_delegation=True,
|
||||
llm="gpt-4o",
|
||||
llm="gpt-5-nano",
|
||||
tools=[],
|
||||
markdown=True
|
||||
)
|
||||
@@ -195,7 +195,7 @@ def main():
|
||||
tasks=[task1, task2, task3, task4],
|
||||
verbose=True,
|
||||
process="sequential",
|
||||
manager_llm="gpt-4o"
|
||||
manager_llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
agents.start()
|
||||
|
||||
@@ -39,9 +39,9 @@ researcher = Agent(
|
||||
verbose=True,
|
||||
allow_delegation=False,
|
||||
tools=[internet_search_tool],
|
||||
llm="gpt-4o",
|
||||
llm="gpt-5-nano",
|
||||
markdown=True,
|
||||
reflect_llm="gpt-4o",
|
||||
reflect_llm="gpt-5-nano",
|
||||
min_reflect=2,
|
||||
max_reflect=4
|
||||
)
|
||||
@@ -53,7 +53,7 @@ writer = Agent(
|
||||
making complex tech topics interesting and easy to understand.""",
|
||||
verbose=True,
|
||||
allow_delegation=True,
|
||||
llm="gpt-4o",
|
||||
llm="gpt-5-nano",
|
||||
tools=[],
|
||||
markdown=True
|
||||
)
|
||||
@@ -104,7 +104,7 @@ agents = PraisonAIAgents(
|
||||
tasks=[task1, task2, task3, task4],
|
||||
verbose=False,
|
||||
process="sequential", # "sequential" or "hierarchical"
|
||||
manager_llm="gpt-4o"
|
||||
manager_llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
result = agents.start()
|
||||
|
||||
@@ -30,7 +30,7 @@ with st.sidebar:
|
||||
# Model selection
|
||||
model = st.selectbox(
|
||||
"Select Model",
|
||||
["gpt-5-nano", "gpt-4o", "gpt-3.5-turbo", "claude-3-opus"],
|
||||
["gpt-5-nano", "gpt-5-nano", "gpt-3.5-turbo", "claude-3-opus"],
|
||||
index=0
|
||||
)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ agent = Agent(
|
||||
"Help users understand security concepts, analyze security threats, "
|
||||
"and provide guidance on security best practices, risk assessment, "
|
||||
"and security architecture design.",
|
||||
llm="openai/gpt-4o"
|
||||
llm="openai/gpt-5-nano"
|
||||
)
|
||||
|
||||
response = agent.start("Hello! I'm your cybersecurity assistant. "
|
||||
|
||||
@@ -5,7 +5,7 @@ agent = Agent(
|
||||
"Help users design data pipelines, optimize database performance, "
|
||||
"create ETL processes, and provide guidance on data architecture, "
|
||||
"data modeling, and big data technologies.",
|
||||
llm="openai/gpt-4o"
|
||||
llm="openai/gpt-5-nano"
|
||||
)
|
||||
|
||||
response = agent.start("Hello! I'm your data engineer assistant. "
|
||||
|
||||
@@ -5,7 +5,7 @@ agent = Agent(
|
||||
"Help users develop marketing strategies, analyze market trends, "
|
||||
"create campaign plans, and provide guidance on digital marketing, "
|
||||
"brand positioning, and customer acquisition strategies.",
|
||||
llm="openai/gpt-4o"
|
||||
llm="openai/gpt-5-nano"
|
||||
)
|
||||
|
||||
response = agent.start("Hello! I'm your marketing strategist assistant. "
|
||||
|
||||
@@ -5,7 +5,7 @@ agent = Agent(
|
||||
"Help users with product strategy, feature prioritization, "
|
||||
"user research analysis, and product roadmap planning. Provide "
|
||||
"guidance on market analysis, competitive positioning, and user experience.",
|
||||
llm="openai/gpt-4o"
|
||||
llm="openai/gpt-5-nano"
|
||||
)
|
||||
|
||||
response = agent.start("Hello! I'm your product manager assistant. "
|
||||
|
||||
@@ -5,7 +5,7 @@ agent = Agent(
|
||||
"Help users design software systems, create architecture diagrams, "
|
||||
"plan system integrations, and provide guidance on scalability, "
|
||||
"security, and best practices for software development.",
|
||||
llm="openai/gpt-4o"
|
||||
llm="openai/gpt-5-nano"
|
||||
)
|
||||
|
||||
response = agent.start("Hello! I'm your software architect assistant. "
|
||||
|
||||
@@ -7,7 +7,7 @@ from praisonaiagents import Agent
|
||||
# Initialize Agent with OpenAI GPT-4
|
||||
agent = Agent(
|
||||
instructions="You are a helpful assistant",
|
||||
llm="openai/gpt-4o",
|
||||
llm="openai/gpt-5-nano",
|
||||
)
|
||||
|
||||
# Example conversation
|
||||
|
||||
@@ -28,7 +28,7 @@ web_scraper_agent = Agent(
|
||||
goal="Extract URLs from https://quotes.toscrape.com/",
|
||||
backstory="An expert in data extraction from websites, adept at navigating and retrieving detailed information.",
|
||||
tools=[code_interpret],
|
||||
llm="gpt-4o"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
url_data_extractor_agent = Agent(
|
||||
@@ -37,7 +37,7 @@ url_data_extractor_agent = Agent(
|
||||
goal="Crawl each URL for data extraction",
|
||||
backstory="Specializes in crawling websites to gather comprehensive data, ensuring nothing is missed from each link.",
|
||||
tools=[code_interpret],
|
||||
llm="gpt-4o"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
blog_writer_agent = Agent(
|
||||
@@ -46,7 +46,7 @@ blog_writer_agent = Agent(
|
||||
goal="Create engaging and insightful blog posts from provided data",
|
||||
backstory="An experienced content creator and storyteller with a knack for weaving compelling narratives. Skilled at analyzing quotes and creating meaningful connections that resonate with readers.",
|
||||
tools=[code_interpret],
|
||||
llm="gpt-4o"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
# 2) Create Tasks
|
||||
@@ -88,7 +88,7 @@ agents_manager = PraisonAIAgents(
|
||||
tasks=[task_url_extraction, task_data_extraction, blog_writing_task],
|
||||
verbose=True,
|
||||
process="hierarchical",
|
||||
manager_llm="gpt-4o"
|
||||
manager_llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
result = agents_manager.start()
|
||||
@@ -56,7 +56,7 @@ web_scraper_agent = Agent(
|
||||
min_reflect=3,
|
||||
max_reflect=5,
|
||||
tools=[code_interpret, save_to_file, run_terminal_command],
|
||||
llm="gpt-4o"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
task = Task(
|
||||
|
||||
@@ -23,7 +23,7 @@ with st.sidebar:
|
||||
"Choose LLM Model",
|
||||
options=[
|
||||
"gpt-5-nano",
|
||||
"gpt-4o",
|
||||
"gpt-5-nano",
|
||||
"gpt-3.5-turbo",
|
||||
"claude-3-5-sonnet-20241022",
|
||||
"claude-3-5-haiku-20241022"
|
||||
|
||||
@@ -162,7 +162,7 @@ manager_agent = Agent(
|
||||
""",
|
||||
tools=[],
|
||||
verbose=True,
|
||||
llm="gpt-4o",
|
||||
llm="gpt-5-nano",
|
||||
markdown=True,
|
||||
memory={"short_term": {"target_domain": domain}, "long_term": qdrant_client},
|
||||
)
|
||||
@@ -186,7 +186,7 @@ tool_agent = Agent(
|
||||
""",
|
||||
tools=domain_tools, # Use domain-aware tools
|
||||
verbose=True,
|
||||
llm="gpt-4o",
|
||||
llm="gpt-5-nano",
|
||||
markdown=True,
|
||||
memory={"short_term": {"target_domain": domain}, "long_term": qdrant_client},
|
||||
)
|
||||
@@ -209,7 +209,7 @@ sr_pentester_agent = Agent(
|
||||
""",
|
||||
tools=[],
|
||||
verbose=True,
|
||||
llm="gpt-4o",
|
||||
llm="gpt-5-nano",
|
||||
markdown=True,
|
||||
memory={"short_term": {"target_domain": domain}, "long_term": qdrant_client},
|
||||
)
|
||||
@@ -232,7 +232,7 @@ ciso_agent = Agent(
|
||||
""",
|
||||
tools=[],
|
||||
verbose=True,
|
||||
llm="gpt-4o",
|
||||
llm="gpt-5-nano",
|
||||
markdown=True,
|
||||
memory={"short_term": {"target_domain": domain}, "long_term": qdrant_client},
|
||||
)
|
||||
@@ -268,7 +268,7 @@ agents = PraisonAIAgents(
|
||||
tasks=[tool_query_task, pentester_analysis_task, ciso_review_task],
|
||||
verbose=True,
|
||||
process="hierarchical",
|
||||
manager_llm="gpt-4o",
|
||||
manager_llm="gpt-5-nano",
|
||||
memory=True, # Enable shared memory for domain context
|
||||
memory_config={
|
||||
"provider": "rag",
|
||||
|
||||
@@ -22,7 +22,7 @@ def multiply(a: int, b: int) -> int:
|
||||
|
||||
agent = Agent(
|
||||
instructions="You are a helpful assistant. You can use the tools provided to you to help the user.",
|
||||
llm="gpt-4o",
|
||||
llm="gpt-5-nano",
|
||||
tools=[get_stock_price, multiply]
|
||||
)
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ def multiply(a: int, b: int) -> int:
|
||||
|
||||
agent = Agent(
|
||||
instructions="You are a helpful assistant. You can use the tools provided to you to help the user.",
|
||||
llm="gpt-4o",
|
||||
llm="gpt-5-nano",
|
||||
tools=[get_stock_price, multiply]
|
||||
)
|
||||
|
||||
|
||||
@@ -250,8 +250,8 @@ class Agent:
|
||||
instructions (Optional[str], optional): Direct instructions that override role, goal,
|
||||
and backstory when provided. Used for simple, task-specific agents. Defaults to None.
|
||||
llm (Optional[Union[str, Any]], optional): Language model configuration. Can be a model
|
||||
name string (e.g., "gpt-4o", "anthropic/claude-3-sonnet") or a configured LLM object.
|
||||
Defaults to environment variable OPENAI_MODEL_NAME or "gpt-4o".
|
||||
name string (e.g., "gpt-5-nano", "anthropic/claude-3-sonnet") or a configured LLM object.
|
||||
Defaults to environment variable OPENAI_MODEL_NAME or "gpt-5-nano".
|
||||
tools (Optional[List[Any]], optional): List of tools, functions, or capabilities
|
||||
available to the agent for task execution. Can include callables, tool objects,
|
||||
or MCP instances. Defaults to None.
|
||||
@@ -395,7 +395,7 @@ class Agent:
|
||||
self.llm_instance = LLM(**llm_config)
|
||||
else:
|
||||
# Create LLM with model string and base_url
|
||||
model_name = llm or os.getenv('OPENAI_MODEL_NAME', 'gpt-4o')
|
||||
model_name = llm or os.getenv('OPENAI_MODEL_NAME', 'gpt-5-nano')
|
||||
self.llm_instance = LLM(
|
||||
model=model_name,
|
||||
base_url=base_url,
|
||||
@@ -450,7 +450,7 @@ class Agent:
|
||||
) from e
|
||||
# Otherwise, fall back to OpenAI environment/name
|
||||
else:
|
||||
self.llm = llm or os.getenv('OPENAI_MODEL_NAME', 'gpt-4o')
|
||||
self.llm = llm or os.getenv('OPENAI_MODEL_NAME', 'gpt-5-nano')
|
||||
# Handle tools parameter - ensure it's always a list
|
||||
if callable(tools):
|
||||
# If a single function/callable is passed, wrap it in a list
|
||||
@@ -487,7 +487,7 @@ class Agent:
|
||||
self.min_reflect = min_reflect
|
||||
self.reflect_prompt = reflect_prompt
|
||||
# Use the same model selection logic for reflect_llm
|
||||
self.reflect_llm = reflect_llm or os.getenv('OPENAI_MODEL_NAME', 'gpt-4o')
|
||||
self.reflect_llm = reflect_llm or os.getenv('OPENAI_MODEL_NAME', 'gpt-5-nano')
|
||||
self._console = None # Lazy load console when needed
|
||||
|
||||
# Initialize system prompt
|
||||
@@ -573,7 +573,7 @@ Your Goal: {self.goal}
|
||||
|
||||
Returns:
|
||||
The LLM model/instance being used by this agent.
|
||||
- For standard models: returns the model string (e.g., "gpt-4o")
|
||||
- For standard models: returns the model string (e.g., "gpt-5-nano")
|
||||
- For custom LLM instances: returns the LLM instance object
|
||||
- For provider models: returns the LLM instance object
|
||||
"""
|
||||
@@ -583,7 +583,7 @@ Your Goal: {self.goal}
|
||||
return self.llm
|
||||
else:
|
||||
# Default fallback
|
||||
return "gpt-4o"
|
||||
return "gpt-5-nano"
|
||||
|
||||
def _ensure_knowledge_processed(self):
|
||||
"""Ensure knowledge is initialized and processed when first accessed."""
|
||||
|
||||
@@ -163,7 +163,7 @@ class PraisonAIAgents:
|
||||
self.name = name # Store the name for the Agents collection
|
||||
|
||||
# Check for manager_llm in environment variable if not provided
|
||||
self.manager_llm = manager_llm or os.getenv('OPENAI_MODEL_NAME', 'gpt-4o')
|
||||
self.manager_llm = manager_llm or os.getenv('OPENAI_MODEL_NAME', 'gpt-5-nano')
|
||||
|
||||
# Set logger level based on verbose
|
||||
if verbose >= 5:
|
||||
|
||||
@@ -92,7 +92,7 @@ class AutoAgents(PraisonAIAgents):
|
||||
self.self_reflect = self_reflect
|
||||
self.max_reflect = max_reflect
|
||||
self.min_reflect = min_reflect
|
||||
self.llm = llm or os.getenv('OPENAI_MODEL_NAME', 'gpt-4o')
|
||||
self.llm = llm or os.getenv('OPENAI_MODEL_NAME', 'gpt-5-nano')
|
||||
self.function_calling_llm = function_calling_llm
|
||||
self.respect_context_window = respect_context_window
|
||||
self.code_execution_mode = code_execution_mode
|
||||
|
||||
@@ -61,7 +61,7 @@ class LLM:
|
||||
MODEL_WINDOWS = {
|
||||
# OpenAI
|
||||
"gpt-4": 6144, # 8,192 actual
|
||||
"gpt-4o": 96000, # 128,000 actual
|
||||
"gpt-5-nano": 96000, # 128,000 actual
|
||||
"gpt-5-nano": 96000, # 128,000 actual
|
||||
"gpt-4-turbo": 96000, # 128,000 actual
|
||||
"o1-preview": 96000, # 128,000 actual
|
||||
@@ -907,7 +907,7 @@ class LLM:
|
||||
prompt: Union[str, List[Dict]],
|
||||
system_prompt: Optional[str] = None,
|
||||
chat_history: Optional[List[Dict]] = None,
|
||||
temperature: float = 0.2,
|
||||
temperature: float = 1.0,
|
||||
tools: Optional[List[Any]] = None,
|
||||
output_json: Optional[BaseModel] = None,
|
||||
output_pydantic: Optional[BaseModel] = None,
|
||||
@@ -2042,7 +2042,7 @@ Output MUST be JSON with 'reflection' and 'satisfactory'.
|
||||
prompt: Union[str, List[Dict]],
|
||||
system_prompt: Optional[str] = None,
|
||||
chat_history: Optional[List[Dict]] = None,
|
||||
temperature: float = 0.2,
|
||||
temperature: float = 1.0,
|
||||
tools: Optional[List[Any]] = None,
|
||||
output_json: Optional[BaseModel] = None,
|
||||
output_pydantic: Optional[BaseModel] = None,
|
||||
@@ -2317,7 +2317,7 @@ Output MUST be JSON with 'reflection' and 'satisfactory'.
|
||||
prompt: Union[str, List[Dict]],
|
||||
system_prompt: Optional[str] = None,
|
||||
chat_history: Optional[List[Dict]] = None,
|
||||
temperature: float = 0.2,
|
||||
temperature: float = 1.0,
|
||||
tools: Optional[List[Any]] = None,
|
||||
output_json: Optional[BaseModel] = None,
|
||||
output_pydantic: Optional[BaseModel] = None,
|
||||
@@ -3126,7 +3126,9 @@ Output MUST be JSON with 'reflection' and 'satisfactory'.
|
||||
|
||||
# Add extra settings for provider-specific parameters (e.g., num_ctx for Ollama)
|
||||
if self.extra_settings:
|
||||
params.update(self.extra_settings)
|
||||
# Filter out internal parameters that shouldn't be passed to the API
|
||||
filtered_extra_settings = {k: v for k, v in self.extra_settings.items() if k != 'metrics'}
|
||||
params.update(filtered_extra_settings)
|
||||
|
||||
# Override with any provided parameters
|
||||
params.update(override_params)
|
||||
@@ -3260,7 +3262,7 @@ Output MUST be JSON with 'reflection' and 'satisfactory'.
|
||||
self,
|
||||
prompt: Union[str, List[Dict]],
|
||||
system_prompt: Optional[str] = None,
|
||||
temperature: float = 0.2,
|
||||
temperature: float = 1.0,
|
||||
stream: bool = True,
|
||||
verbose: bool = True,
|
||||
markdown: bool = True,
|
||||
@@ -3355,7 +3357,7 @@ Output MUST be JSON with 'reflection' and 'satisfactory'.
|
||||
self,
|
||||
prompt: Union[str, List[Dict]],
|
||||
system_prompt: Optional[str] = None,
|
||||
temperature: float = 0.2,
|
||||
temperature: float = 1.0,
|
||||
stream: bool = True,
|
||||
verbose: bool = True,
|
||||
markdown: bool = True,
|
||||
|
||||
@@ -6,7 +6,7 @@ This module defines which models support specific features like structured outpu
|
||||
# Models that support OpenAI-style structured outputs (response_format with Pydantic models)
|
||||
MODELS_SUPPORTING_STRUCTURED_OUTPUTS = {
|
||||
# OpenAI models
|
||||
"gpt-4o",
|
||||
"gpt-5-nano",
|
||||
"gpt-5-nano",
|
||||
"gpt-4-turbo",
|
||||
"gpt-4-turbo-preview",
|
||||
|
||||
@@ -80,7 +80,7 @@ class ModelRouter:
|
||||
|
||||
# Mid-tier models for moderate complexity
|
||||
ModelProfile(
|
||||
name="gpt-4o",
|
||||
name="gpt-5-nano",
|
||||
provider="openai",
|
||||
complexity_range=(TaskComplexity.MODERATE, TaskComplexity.COMPLEX),
|
||||
cost_per_1k_tokens=0.0075, # Average of $0.0025 input, $0.01 output
|
||||
@@ -145,7 +145,7 @@ class ModelRouter:
|
||||
preferred_providers: List of preferred providers in order
|
||||
"""
|
||||
self.models = models or self.DEFAULT_MODELS
|
||||
self.default_model = default_model or os.getenv('OPENAI_MODEL_NAME', 'gpt-4o')
|
||||
self.default_model = default_model or os.getenv('OPENAI_MODEL_NAME', 'gpt-5-nano')
|
||||
self.cost_threshold = cost_threshold
|
||||
self.preferred_providers = preferred_providers or []
|
||||
|
||||
|
||||
@@ -740,7 +740,7 @@ class OpenAIClient:
|
||||
def create_completion(
|
||||
self,
|
||||
messages: List[Dict[str, Any]],
|
||||
model: str = "gpt-4o",
|
||||
model: str = "gpt-5-nano",
|
||||
temperature: float = 1.0,
|
||||
stream: bool = False,
|
||||
tools: Optional[List[Dict[str, Any]]] = None,
|
||||
@@ -785,7 +785,7 @@ class OpenAIClient:
|
||||
async def acreate_completion(
|
||||
self,
|
||||
messages: List[Dict[str, Any]],
|
||||
model: str = "gpt-4o",
|
||||
model: str = "gpt-5-nano",
|
||||
temperature: float = 1.0,
|
||||
stream: bool = False,
|
||||
tools: Optional[List[Dict[str, Any]]] = None,
|
||||
@@ -830,7 +830,7 @@ class OpenAIClient:
|
||||
def chat_completion_with_tools(
|
||||
self,
|
||||
messages: List[Dict[str, Any]],
|
||||
model: str = "gpt-4o",
|
||||
model: str = "gpt-5-nano",
|
||||
temperature: float = 1.0,
|
||||
tools: Optional[List[Any]] = None,
|
||||
execute_tool_fn: Optional[Callable] = None,
|
||||
@@ -1008,7 +1008,7 @@ class OpenAIClient:
|
||||
async def achat_completion_with_tools(
|
||||
self,
|
||||
messages: List[Dict[str, Any]],
|
||||
model: str = "gpt-4o",
|
||||
model: str = "gpt-5-nano",
|
||||
temperature: float = 1.0,
|
||||
tools: Optional[List[Any]] = None,
|
||||
execute_tool_fn: Optional[Callable] = None,
|
||||
@@ -1189,7 +1189,7 @@ class OpenAIClient:
|
||||
def chat_completion_with_tools_stream(
|
||||
self,
|
||||
messages: List[Dict[str, Any]],
|
||||
model: str = "gpt-4o",
|
||||
model: str = "gpt-5-nano",
|
||||
temperature: float = 1.0,
|
||||
tools: Optional[List[Any]] = None,
|
||||
execute_tool_fn: Optional[Callable] = None,
|
||||
@@ -1334,7 +1334,7 @@ class OpenAIClient:
|
||||
self,
|
||||
messages: List[Dict[str, Any]],
|
||||
response_format: BaseModel,
|
||||
model: str = "gpt-4o",
|
||||
model: str = "gpt-5-nano",
|
||||
temperature: float = 1.0,
|
||||
**kwargs
|
||||
) -> Any:
|
||||
@@ -1368,7 +1368,7 @@ class OpenAIClient:
|
||||
self,
|
||||
messages: List[Dict[str, Any]],
|
||||
response_format: BaseModel,
|
||||
model: str = "gpt-4o",
|
||||
model: str = "gpt-5-nano",
|
||||
temperature: float = 1.0,
|
||||
**kwargs
|
||||
) -> Any:
|
||||
|
||||
@@ -109,7 +109,7 @@ class Memory:
|
||||
},
|
||||
"llm": {
|
||||
"provider": "openai",
|
||||
"config": {"model": "gpt-4o", "api_key": "..."}
|
||||
"config": {"model": "gpt-5-nano", "api_key": "..."}
|
||||
},
|
||||
"embedder": {
|
||||
"provider": "openai",
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "praisonaiagents"
|
||||
version = "0.0.158"
|
||||
version = "0.0.161"
|
||||
description = "Praison AI agents for completing complex tasks with Self Reflection Agents"
|
||||
requires-python = ">=3.10"
|
||||
authors = [
|
||||
|
||||
@@ -51,7 +51,7 @@ def test_guardrail_return_types():
|
||||
role="Tester",
|
||||
goal="Test guardrails",
|
||||
backstory="Testing guardrail functionality",
|
||||
llm="gpt-4o"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
# Test creating tasks with each guardrail type
|
||||
@@ -105,7 +105,7 @@ def test_guardrail_result_handling():
|
||||
role="Tester",
|
||||
goal="Test guardrails",
|
||||
backstory="Testing guardrail functionality",
|
||||
llm="gpt-4o"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
test_output = TaskOutput(
|
||||
|
||||
@@ -33,7 +33,7 @@ def main():
|
||||
|
||||
# Using different model
|
||||
print("\n3. Using a different model:")
|
||||
run_command([sys.executable, "tests/basic-agents.py", "--model", "gpt-4o", "Explain quantum computing in simple terms"])
|
||||
run_command([sys.executable, "tests/basic-agents.py", "--model", "gpt-5-nano", "Explain quantum computing in simple terms"])
|
||||
|
||||
# With debug logging
|
||||
print("\n4. With debug logging:")
|
||||
|
||||
Generated
+1
-1
@@ -2422,7 +2422,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "praisonaiagents"
|
||||
version = "0.0.158"
|
||||
version = "0.0.161"
|
||||
source = { editable = "." }
|
||||
dependencies = [
|
||||
{ name = "aiohttp" },
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
OPENAI_MODEL_NAME="gpt-4o"
|
||||
OPENAI_MODEL_NAME="gpt-5-nano"
|
||||
OPENAI_API_KEY="Enter your API key"
|
||||
OPENAI_API_BASE="https://api.openai.com/v1"
|
||||
CHAINLIT_USERNAME=admin
|
||||
|
||||
@@ -36,7 +36,7 @@ roles:
|
||||
llm:
|
||||
model: "anthropic/claude-3-haiku-20240307"
|
||||
function_calling_llm:
|
||||
model: "openai/gpt-4o"
|
||||
model: "openai/gpt-5-nano"
|
||||
tasks:
|
||||
content_creation:
|
||||
description: Create detailed content summarizing the research findings on
|
||||
|
||||
@@ -3,8 +3,8 @@ class Praisonai < Formula
|
||||
|
||||
desc "AI tools for various AI applications"
|
||||
homepage "https://github.com/MervinPraison/PraisonAI"
|
||||
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.84.tar.gz"
|
||||
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.84.tar.gz | shasum -a 256`.split.first
|
||||
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.87.tar.gz"
|
||||
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.87.tar.gz | shasum -a 256`.split.first
|
||||
license "MIT"
|
||||
|
||||
depends_on "[email protected]"
|
||||
|
||||
@@ -497,7 +497,7 @@ class AgentsGenerator:
|
||||
# Create model client for v0.4
|
||||
model_config = self.config_list[0] if self.config_list else {}
|
||||
model_client = OpenAIChatCompletionClient(
|
||||
model=model_config.get('model', 'gpt-4o'),
|
||||
model=model_config.get('model', 'gpt-5-nano'),
|
||||
api_key=model_config.get('api_key', os.environ.get("OPENAI_API_KEY")),
|
||||
base_url=model_config.get('base_url', "https://api.openai.com/v1")
|
||||
)
|
||||
|
||||
@@ -57,7 +57,7 @@ class CloudDeployer:
|
||||
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.84 gunicorn markdown\n")
|
||||
file.write("RUN pip install flask praisonai==2.2.87 gunicorn markdown\n")
|
||||
file.write("EXPOSE 8080\n")
|
||||
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
|
||||
|
||||
@@ -128,7 +128,7 @@ class CloudDeployer:
|
||||
return
|
||||
|
||||
# Get environment variables
|
||||
openai_model = os.environ.get('OPENAI_MODEL_NAME', 'gpt-4o')
|
||||
openai_model = os.environ.get('OPENAI_MODEL_NAME', 'gpt-5-nano')
|
||||
openai_key = os.environ.get('OPENAI_API_KEY', 'Enter your API key')
|
||||
openai_base = os.environ.get('OPENAI_API_BASE', 'https://api.openai.com/v1')
|
||||
|
||||
|
||||
@@ -431,7 +431,7 @@ async def ui_run_praisonai(config, topic, tools_dict):
|
||||
role=role_filled,
|
||||
goal=goal_filled,
|
||||
backstory=backstory_filled,
|
||||
llm=details.get('llm', 'gpt-4o'),
|
||||
llm=details.get('llm', 'gpt-5-nano'),
|
||||
verbose=True,
|
||||
allow_delegation=details.get('allow_delegation', False),
|
||||
max_iter=details.get('max_iter', 15),
|
||||
@@ -526,7 +526,7 @@ async def ui_run_praisonai(config, topic, tools_dict):
|
||||
tasks=tasks,
|
||||
verbose=True,
|
||||
process="hierarchical",
|
||||
manager_llm=config.get('manager_llm', 'gpt-4o')
|
||||
manager_llm=config.get('manager_llm', 'gpt-5-nano')
|
||||
)
|
||||
else:
|
||||
prai_agents = PraisonAIAgents(
|
||||
|
||||
@@ -341,7 +341,7 @@ async def ui_run_praisonai(config, topic, tools_dict):
|
||||
role=role_filled,
|
||||
goal=goal_filled,
|
||||
backstory=backstory_filled,
|
||||
llm=details.get('llm', 'gpt-4o'),
|
||||
llm=details.get('llm', 'gpt-5-nano'),
|
||||
verbose=True,
|
||||
allow_delegation=details.get('allow_delegation', False),
|
||||
max_iter=details.get('max_iter', 15),
|
||||
@@ -426,7 +426,7 @@ async def ui_run_praisonai(config, topic, tools_dict):
|
||||
tasks=tasks,
|
||||
verbose=True,
|
||||
process="hierarchical",
|
||||
manager_llm=config.get('manager_llm', 'gpt-4o')
|
||||
manager_llm=config.get('manager_llm', 'gpt-5-nano')
|
||||
)
|
||||
else:
|
||||
crew = PraisonAIAgents(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "PraisonAI"
|
||||
version = "2.2.84"
|
||||
version = "2.2.87"
|
||||
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 = ""
|
||||
@@ -12,7 +12,7 @@ dependencies = [
|
||||
"rich>=13.7",
|
||||
"markdown>=3.5",
|
||||
"pyparsing>=3.0.0",
|
||||
"praisonaiagents>=0.0.158",
|
||||
"praisonaiagents>=0.0.161",
|
||||
"python-dotenv>=0.19.0",
|
||||
"instructor>=1.3.3",
|
||||
"PyYAML>=6.0",
|
||||
@@ -102,7 +102,7 @@ autogen-v4 = [
|
||||
|
||||
[tool.poetry]
|
||||
name = "PraisonAI"
|
||||
version = "2.2.84"
|
||||
version = "2.2.87"
|
||||
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 = ""
|
||||
@@ -120,7 +120,7 @@ python = ">=3.10,<3.13"
|
||||
rich = ">=13.7"
|
||||
markdown = ">=3.5"
|
||||
pyparsing = ">=3.0.0"
|
||||
praisonaiagents = ">=0.0.158"
|
||||
praisonaiagents = ">=0.0.161"
|
||||
python-dotenv = ">=0.19.0"
|
||||
instructor = ">=1.3.3"
|
||||
PyYAML = ">=6.0"
|
||||
|
||||
@@ -19,7 +19,7 @@ deployment:
|
||||
|
||||
# Optional: Environment variables for deployment
|
||||
# environment:
|
||||
# OPENAI_MODEL_NAME: "gpt-4o"
|
||||
# OPENAI_MODEL_NAME: "gpt-5-nano"
|
||||
# OPENAI_API_KEY: "your-api-key"
|
||||
# OPENAI_API_BASE: "https://api.openai.com/v1"
|
||||
|
||||
|
||||
Generated
+5
-5
@@ -4031,7 +4031,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "praisonai"
|
||||
version = "2.2.84"
|
||||
version = "2.2.87"
|
||||
source = { editable = "." }
|
||||
dependencies = [
|
||||
{ name = "instructor" },
|
||||
@@ -4185,7 +4185,7 @@ requires-dist = [
|
||||
{ name = "praisonai-tools", marker = "extra == 'autogen'", specifier = ">=0.0.22" },
|
||||
{ name = "praisonai-tools", marker = "extra == 'autogen-v4'", specifier = ">=0.0.22" },
|
||||
{ name = "praisonai-tools", marker = "extra == 'crewai'", specifier = ">=0.0.22" },
|
||||
{ name = "praisonaiagents", specifier = ">=0.0.158" },
|
||||
{ name = "praisonaiagents", specifier = ">=0.0.161" },
|
||||
{ name = "pyautogen", marker = "extra == 'autogen'", specifier = "==0.2.29" },
|
||||
{ name = "pydantic", marker = "extra == 'chat'", specifier = "<=2.10.1" },
|
||||
{ name = "pydantic", marker = "extra == 'code'", specifier = "<=2.10.1" },
|
||||
@@ -4240,7 +4240,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "praisonaiagents"
|
||||
version = "0.0.158"
|
||||
version = "0.0.161"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "aiohttp" },
|
||||
@@ -4249,9 +4249,9 @@ dependencies = [
|
||||
{ name = "pydantic" },
|
||||
{ name = "rich" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/b5/16/867987b5751adfda215a9ead833f9511fa7df288b3a250fd89252f1f3ed7/praisonaiagents-0.0.158.tar.gz", hash = "sha256:c069e7438b24be1bda31c601af1d22d797e6ddf7e6b3d795b4352263e7c37d49", size = 285684, upload-time = "2025-08-08T06:53:21.015Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/f2/a5/97bd65cf513070b647ada80c39610fd4c86c80f70404bb0972e100c2a4f2/praisonaiagents-0.0.161.tar.gz", hash = "sha256:88b6c28f1fa9d0f0f802d5a916471606c351d3359800982eb49f38e89dbff363", size = 285757, upload-time = "2025-08-08T12:43:46.337Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/0a/8c/8e92f7f6a956e39526bb54d501db1c49753833545f3436b53f382a9af175/praisonaiagents-0.0.158-py3-none-any.whl", hash = "sha256:7079e94a19645f800a560a26717c38f7fb4e2752d8b180d3d1206951841f8e34", size = 305009, upload-time = "2025-08-08T06:53:19.566Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/41/28/fd9df18c45f461afef17c69587b1502901dc1b3331056b79685f9b932017/praisonaiagents-0.0.161-py3-none-any.whl", hash = "sha256:a2db2a52a6684d0b0d935b664741d1594020cba41a6f212abbadc654a999af33", size = 305084, upload-time = "2025-08-08T12:43:44.86Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
Reference in new issue
Block a user