mirror of
https://github.com/MervinPraison/PraisonAI.git
synced 2026-11-08 01:08:39 -10:00
Compare commits
No files matched your search
@@ -22,5 +22,5 @@ jobs:
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: '@claude review this issue and do a detailed analysis and fix this if the existing code doesn\'t have the solution implemented. Making sure it has backward compatibility, no existing features removed. After making those changes, again review the applied changes. Use @web to search if you dont know any information or to find the latest documentation or to find the latest version. Run the code if you think you need to run it to test it. Minimal code change to start with if required any changes. **Please create a PR using gh tool with your changes**.'
|
||||
body: '@claude review this issue and do a detailed analysis and fix this if the existing code doesn\'t have the solution implemented. Making sure it has backward compatibility, no existing features removed. After making those changes, again review the applied changes. Use @web to search if you dont know any information or to find the latest documentation or to find the latest version. Run the code if you think you need to run it to test it. Minimal code change to start with if required any changes. MAINLY IT SHOULD NOT IMPACT ON THE CURRENT SPEED OF EXECUTION of existing features, not increasing the overhead. **Please create a PR using gh tool with your changes**.'
|
||||
})
|
||||
@@ -19,5 +19,5 @@ jobs:
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: '@claude review this pull request and do a detailed analysis and fix this if the existing code doesn\'t have the solution implemented. Making sure it has backward compatibility, no existing features removed. After making those changes, again review the applied changes. Use @web to search if you dont know any information or to find the latest documentation or to find the latest version. Run the code if you think you need to run it to test it. Minimal code change to start with if required any changes.'
|
||||
body: '@claude review this pull request and do a detailed analysis and fix this if the existing code doesn\'t have the solution implemented. Making sure it has backward compatibility, no existing features removed. After making those changes, again review the applied changes. Use @web to search if you dont know any information or to find the latest documentation or to find the latest version. Run the code if you think you need to run it to test it. Minimal code change to start with if required any changes. MAINLY IT SHOULD NOT IMPACT ON THE CURRENT SPEED OF EXECUTION of existing features, not increasing the overhead.'
|
||||
})
|
||||
@@ -12,13 +12,12 @@ on:
|
||||
|
||||
jobs:
|
||||
claude-response:
|
||||
# Prevent bots from triggering this action
|
||||
# Prevent certain bots from triggering this action (but allow github-actions[bot] for auto-comments)
|
||||
if: |
|
||||
github.actor != 'dependabot[bot]' &&
|
||||
github.actor != 'github-actions[bot]' &&
|
||||
github.actor != 'cursor[bot]' &&
|
||||
!contains(github.actor, '[bot]') &&
|
||||
github.actor != 'renovate[bot]'
|
||||
github.actor != 'renovate[bot]' &&
|
||||
!(contains(github.actor, '[bot]') && github.actor != 'github-actions[bot]')
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -154,7 +153,7 @@ jobs:
|
||||
issue_number: issueNumber,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: '@claude review if the changes made in the above branch are as per the requirements and make changes to the above branch if issues still exist.'
|
||||
body: '@claude review if the changes made in the above branch are as per the requirements and make changes to the above branch if issues still exist. MAINLY IT SHOULD NOT IMPACT ON THE CURRENT SPEED OF EXECUTION of existing features, not increasing the overhead.'
|
||||
});
|
||||
} else {
|
||||
console.log(`Skipping review comment for regular issue #${issueNumber}`);
|
||||
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
run: |
|
||||
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY || 'sk-test-key-for-github-actions-testing-only-not-real' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_API_BASE=${{ secrets.OPENAI_API_BASE || 'https://api.openai.com/v1' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME || 'gpt-4o-mini' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME || 'gpt-5-nano' }}" >> $GITHUB_ENV
|
||||
echo "LOGLEVEL=DEBUG" >> $GITHUB_ENV
|
||||
echo "PYTHONPATH=${{ github.workspace }}/src/praisonai-agents:$PYTHONPATH" >> $GITHUB_ENV
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
run: |
|
||||
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY || 'sk-test-key-for-github-actions-testing-only-not-real' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_API_BASE=${{ secrets.OPENAI_API_BASE || 'https://api.openai.com/v1' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME || 'gpt-4o-mini' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME || 'gpt-5-nano' }}" >> $GITHUB_ENV
|
||||
echo "LOGLEVEL=DEBUG" >> $GITHUB_ENV
|
||||
|
||||
- name: Install dependencies
|
||||
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
run: |
|
||||
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY || 'sk-test-key-for-github-actions-testing-only-not-real' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_API_BASE=${{ secrets.OPENAI_API_BASE || 'https://api.openai.com/v1' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME || 'gpt-4o-mini' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME || 'gpt-5-nano' }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Run Comprehensive Test Suite
|
||||
run: |
|
||||
|
||||
@@ -42,13 +42,13 @@ jobs:
|
||||
run: |
|
||||
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY || 'sk-test-key-for-github-actions-testing-only-not-real' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_API_BASE=${{ secrets.OPENAI_API_BASE || 'https://api.openai.com/v1' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME || 'gpt-4o-mini' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME || 'gpt-5-nano' }}" >> $GITHUB_ENV
|
||||
echo "LOGLEVEL=DEBUG" >> $GITHUB_ENV
|
||||
echo "PYTHONPATH=${{ github.workspace }}/src/praisonai-agents:$PYTHONPATH" >> $GITHUB_ENV
|
||||
# Also export to current shell session for immediate availability
|
||||
export OPENAI_API_KEY="${{ secrets.OPENAI_API_KEY || 'sk-test-key-for-github-actions-testing-only-not-real' }}"
|
||||
export OPENAI_API_BASE="${{ secrets.OPENAI_API_BASE || 'https://api.openai.com/v1' }}"
|
||||
export OPENAI_MODEL_NAME="${{ secrets.OPENAI_MODEL_NAME || 'gpt-4o-mini' }}"
|
||||
export OPENAI_MODEL_NAME="${{ secrets.OPENAI_MODEL_NAME || 'gpt-5-nano' }}"
|
||||
export LOGLEVEL=DEBUG
|
||||
# Verify immediate availability
|
||||
echo "🔧 Immediate verification in same step:"
|
||||
@@ -126,7 +126,7 @@ jobs:
|
||||
env:
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY || 'sk-test-key-for-github-actions-testing-only-not-real' }}
|
||||
OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE || 'https://api.openai.com/v1' }}
|
||||
OPENAI_MODEL_NAME: ${{ secrets.OPENAI_MODEL_NAME || 'gpt-4o-mini' }}
|
||||
OPENAI_MODEL_NAME: ${{ secrets.OPENAI_MODEL_NAME || 'gpt-5-nano' }}
|
||||
LOGLEVEL: DEBUG
|
||||
run: |
|
||||
echo "🔍 Testing PraisonAI API key usage directly..."
|
||||
@@ -166,7 +166,7 @@ jobs:
|
||||
|
||||
print('\\n🧪 Testing PraisonAIModel with explicit API key (CrewAI method):')
|
||||
model_with_explicit_key = PraisonAIModel(
|
||||
model='openai/gpt-4o-mini',
|
||||
model='openai/gpt-5-nano',
|
||||
base_url=praisonai.config_list[0].get('base_url'),
|
||||
api_key=api_key_from_config # This will be a string from praisonai.config_list
|
||||
)
|
||||
@@ -251,7 +251,7 @@ jobs:
|
||||
env:
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY || 'sk-test-key-for-github-actions-testing-only-not-real' }}
|
||||
OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE || 'https://api.openai.com/v1' }}
|
||||
OPENAI_MODEL_NAME: ${{ secrets.OPENAI_MODEL_NAME || 'gpt-4o-mini' }}
|
||||
OPENAI_MODEL_NAME: ${{ secrets.OPENAI_MODEL_NAME || 'gpt-5-nano' }}
|
||||
LOGLEVEL: DEBUG
|
||||
run: |
|
||||
echo "🧪 Running legacy tests with real API key..."
|
||||
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
run: |
|
||||
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY || 'sk-test-key-for-github-actions-testing-only-not-real' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_API_BASE=${{ secrets.OPENAI_API_BASE || 'https://api.openai.com/v1' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME || 'gpt-4o-mini' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME || 'gpt-5-nano' }}" >> $GITHUB_ENV
|
||||
echo "PYTHONPATH=${{ github.workspace }}/src/praisonai-agents:$PYTHONPATH" >> $GITHUB_ENV
|
||||
echo "PRAISONAI_TELEMETRY_DISABLED=true" >> $GITHUB_ENV
|
||||
echo "PRAISONAI_DISABLE_TELEMETRY=true" >> $GITHUB_ENV
|
||||
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
run: |
|
||||
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY || 'sk-test-key-for-github-actions-testing-only-not-real' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_API_BASE=${{ secrets.OPENAI_API_BASE || 'https://api.openai.com/v1' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME || 'gpt-4o-mini' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME || 'gpt-5-nano' }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Test ${{ matrix.framework }} Framework
|
||||
run: |
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
run: |
|
||||
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY || 'sk-test-key-for-github-actions-testing-only-not-real' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_API_BASE=${{ secrets.OPENAI_API_BASE || 'https://api.openai.com/v1' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME || 'gpt-4o-mini' }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME || 'gpt-5-nano' }}" >> $GITHUB_ENV
|
||||
echo "LOGLEVEL=DEBUG" >> $GITHUB_ENV
|
||||
echo "PYTHONPATH=${{ github.workspace }}/src/praisonai-agents:$PYTHONPATH" >> $GITHUB_ENV
|
||||
|
||||
@@ -316,8 +316,8 @@ jobs:
|
||||
try:
|
||||
from praisonai.inc.models import PraisonAIModel
|
||||
|
||||
# Test PraisonAIModel with openai/gpt-4o-mini (from YAML)
|
||||
model = PraisonAIModel(model='openai/gpt-4o-mini')
|
||||
# Test PraisonAIModel with openai/gpt-5-nano (from YAML)
|
||||
model = PraisonAIModel(model='openai/gpt-5-nano')
|
||||
|
||||
print('🤖 PraisonAIModel Configuration:')
|
||||
print(f' model: {model.model}')
|
||||
|
||||
+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.76" \
|
||||
"praisonai>=2.2.84" \
|
||||
"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.76" \
|
||||
"praisonai>=2.2.84" \
|
||||
"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.76" \
|
||||
"praisonai>=2.2.84" \
|
||||
"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.76" \
|
||||
"praisonai>=2.2.84" \
|
||||
"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.76`
|
||||
- PraisonAI: `>=2.2.84`
|
||||
- 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.76" "praisonaiagents==0.0.92"
|
||||
RUN pip install "praisonai==2.2.84" "praisonaiagents==0.0.92"
|
||||
```
|
||||
|
||||
## 🌐 Production Deployment
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
"\n",
|
||||
"### ✨ Key Benefits:\n",
|
||||
"- 🚀 **Scalable & Customizable** – Industry-agnostic design \n",
|
||||
"- 💰 **Cost-Effective** – Runs on GPT-4o-mini \n",
|
||||
"- 💰 **Cost-Effective** – Runs on gpt-5-nano \n",
|
||||
"- 🛠️ **Production-Ready** – Realistic automation framework \n",
|
||||
"- 🔄 **Complete Pipeline** – End-to-end flow\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"\n",
|
||||
"### 🔧 Technologies:\n",
|
||||
"**PraisonAI** • **OpenAI GPT-4o-mini** • **Python** • **SQLite** \n",
|
||||
"**PraisonAI** • **OpenAI gpt-5-nano** • **Python** • **SQLite** \n",
|
||||
"**Multi-Agent Architecture**\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
@@ -100,7 +100,7 @@
|
||||
"text": [
|
||||
"📦 Dependencies installed!\n",
|
||||
"🔄 Using PraisonAI Multi-Agent Framework\n",
|
||||
"🤖 Powered by OpenAI GPT-4o-mini\n"
|
||||
"🤖 Powered by OpenAI gpt-5-nano\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -116,7 +116,7 @@
|
||||
"\n",
|
||||
"print(\"📦 Dependencies installed!\")\n",
|
||||
"print(\"🔄 Using PraisonAI Multi-Agent Framework\")\n",
|
||||
"print(\"🤖 Powered by OpenAI GPT-4o-mini\")"
|
||||
"print(\"🤖 Powered by OpenAI gpt-5-nano\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -5102,7 +5102,7 @@
|
||||
"\n",
|
||||
"🎊 BLENDER PRODUCTION STUDIO COMPLETE!\n",
|
||||
"🎬 17-Agent AI System Successfully Executed\n",
|
||||
"🤖 Powered by PraisonAI + OpenAI GPT-4o-mini\n"
|
||||
"🤖 Powered by PraisonAI + OpenAI gpt-5-nano\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -5149,7 +5149,7 @@
|
||||
"\n",
|
||||
"print(\"\\n🎊 BLENDER PRODUCTION STUDIO COMPLETE!\")\n",
|
||||
"print(\"🎬 17-Agent AI System Successfully Executed\")\n",
|
||||
"print(\"🤖 Powered by PraisonAI + OpenAI GPT-4o-mini\")"
|
||||
"print(\"🤖 Powered by PraisonAI + OpenAI gpt-5-nano\")"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
" ]\n",
|
||||
" for turn in range(max_turns):\n",
|
||||
" response = client.chat.completions.create(\n",
|
||||
" model=\"gpt-4o-mini\",\n",
|
||||
" model=\"gpt-5-nano\",\n",
|
||||
" messages=history,\n",
|
||||
" max_tokens=500\n",
|
||||
" )\n",
|
||||
|
||||
+2
-2
@@ -2642,7 +2642,7 @@
|
||||
"\n",
|
||||
"\ud83c\udf8a SEMANTIC NETWORK ANALYSIS COMPLETE!\n",
|
||||
"\ud83c\udf10 Cross-platform profile discovery and analysis\n",
|
||||
"\ud83e\udd16 Powered by PraisonAI + OpenAI GPT-4o-mini\n"
|
||||
"\ud83e\udd16 Powered by PraisonAI + OpenAI gpt-5-nano\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -2687,7 +2687,7 @@
|
||||
"\n",
|
||||
"print(\"\\n\ud83c\udf8a SEMANTIC NETWORK ANALYSIS COMPLETE!\")\n",
|
||||
"print(\"\ud83c\udf10 Cross-platform profile discovery and analysis\")\n",
|
||||
"print(\"\ud83e\udd16 Powered by PraisonAI + OpenAI GPT-4o-mini\")"
|
||||
"print(\"\ud83e\udd16 Powered by PraisonAI + OpenAI gpt-5-nano\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1262,7 +1262,7 @@
|
||||
"\n",
|
||||
"🎊 AI SHOPPING ASSISTANT ACTIVE!\n",
|
||||
"🛒 Ready to help customers with natural language shopping\n",
|
||||
"🤖 Powered by PraisonAI + OpenAI GPT-4o-mini\n"
|
||||
"🤖 Powered by PraisonAI + OpenAI gpt-5-nano\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -1305,7 +1305,7 @@
|
||||
"\n",
|
||||
"print(\"\\n🎊 AI SHOPPING ASSISTANT ACTIVE!\")\n",
|
||||
"print(\"🛒 Ready to help customers with natural language shopping\")\n",
|
||||
"print(\"🤖 Powered by PraisonAI + OpenAI GPT-4o-mini\")"
|
||||
"print(\"🤖 Powered by PraisonAI + OpenAI gpt-5-nano\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
" goal=\"Evaluate hackathon projects through video demonstrations\",\n",
|
||||
" backstory=\"\"\"You are an expert hackathon judge. You give fair scores and detailed feedback\n",
|
||||
" on technical complexity, innovation, presentation, and UX.\"\"\",\n",
|
||||
" llm=\"gpt-4o-mini\",\n",
|
||||
" llm=\"gpt-5-nano\",\n",
|
||||
" self_reflect=False\n",
|
||||
")"
|
||||
],
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
"source": [
|
||||
"from llama_index.llms.openai import OpenAI\n",
|
||||
"\n",
|
||||
"llm = OpenAI(model=\"gpt-4o-mini\", api_key=\"Enter your api key here\") # Replace with your OpenAI API key\n"
|
||||
"llm = OpenAI(model=\"gpt-5-nano\", api_key=\"Enter your api key here\") # Replace with your OpenAI API key\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
"judge = Agent(\n",
|
||||
" name=\"Judge\",\n",
|
||||
" role=\"Preside over court proceedings\",\n",
|
||||
" llm=\"gpt-4o-mini\",\n",
|
||||
" llm=\"gpt-5-nano\",\n",
|
||||
" instructions=[\n",
|
||||
" \"You are an impartial judge\",\n",
|
||||
" \"Make fair decisions based on evidence\",\n",
|
||||
@@ -142,7 +142,7 @@
|
||||
"prosecutor = Agent(\n",
|
||||
" name=\"Prosecutor\",\n",
|
||||
" role=\"Present case against defendant\",\n",
|
||||
" llm=\"gpt-4o-mini\",\n",
|
||||
" llm=\"gpt-5-nano\",\n",
|
||||
" instructions=[\n",
|
||||
" \"You are a prosecutor seeking conviction\",\n",
|
||||
" \"Present evidence methodically\",\n",
|
||||
@@ -155,7 +155,7 @@
|
||||
"defense = Agent(\n",
|
||||
" name=\"Defense\",\n",
|
||||
" role=\"Defend the accused\",\n",
|
||||
" llm=\"gpt-4o-mini\",\n",
|
||||
" llm=\"gpt-5-nano\",\n",
|
||||
" instructions=[\n",
|
||||
" \"You are a defense attorney\",\n",
|
||||
" \"Create reasonable doubt\",\n",
|
||||
@@ -168,7 +168,7 @@
|
||||
"witness = Agent(\n",
|
||||
" name=\"Witness\",\n",
|
||||
" role=\"Provide testimony\",\n",
|
||||
" llm=\"gpt-4o-mini\",\n",
|
||||
" llm=\"gpt-5-nano\",\n",
|
||||
" instructions=[\n",
|
||||
" \"You are a witness testifying\",\n",
|
||||
" \"Provide factual testimony\",\n",
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"✅ API key configured!\n",
|
||||
"✅ Using model: gpt-4o-mini\n"
|
||||
"✅ Using model: gpt-5-nano\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -85,7 +85,7 @@
|
||||
"openai_key = \"sk-..\"\n",
|
||||
"\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = openai_key\n",
|
||||
"model_choice = \"gpt-4o-mini\"\n",
|
||||
"model_choice = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"print(\"✅ API key configured!\")\n",
|
||||
"print(f\"✅ Using model: {model_choice}\")"
|
||||
@@ -336,7 +336,7 @@
|
||||
"\n",
|
||||
"temperature: 0.3\n",
|
||||
"max_tokens: 4000\n",
|
||||
"model: \"gpt-4o-mini\"\n",
|
||||
"model: \"gpt-5-nano\"\n",
|
||||
"\"\"\"\n",
|
||||
"\n",
|
||||
"print(\"✅ YAML Prompt configured!\")"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"source": [
|
||||
"# 🤖 Add AI Documentation Processor: Multi-Agent Content Analysis & Code Generation System\n",
|
||||
"\n",
|
||||
"This PR adds a comprehensive AI-powered documentation processing system using PraisonAI and OpenAI GPT-4o-mini. Features 3 specialized agents for content analysis, code generation, and example creation, perfect for automated documentation processing and code generation workflows.\n",
|
||||
"This PR adds a comprehensive AI-powered documentation processing system using PraisonAI and OpenAI gpt-5-nano. Features 3 specialized agents for content analysis, code generation, and example creation, perfect for automated documentation processing and code generation workflows.\n",
|
||||
"\n",
|
||||
"**Key Features:** Multi-agent document analysis, automated code generation, usage example creation, content validation, and scalable processing workflows for various document formats."
|
||||
]
|
||||
|
||||
@@ -491,7 +491,7 @@
|
||||
"\n",
|
||||
"temperature: 0.7\n",
|
||||
"max_tokens: 3000\n",
|
||||
"model: \"gpt-4o-mini\"\n",
|
||||
"model: \"gpt-5-nano\"\n",
|
||||
"\"\"\"\n",
|
||||
"\n",
|
||||
"print(\"✅ YAML Prompt configured!\")"
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
"\n",
|
||||
" def run(self, message: str):\n",
|
||||
" response = client.chat.completions.create(\n",
|
||||
" model=\"gpt-4o-mini\",\n",
|
||||
" model=\"gpt-5-nano\",\n",
|
||||
" messages=[\n",
|
||||
" {\"role\": \"system\", \"content\": self.prompt},\n",
|
||||
" {\"role\": \"user\", \"content\": message}\n",
|
||||
|
||||
@@ -585,7 +585,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -1090,7 +1090,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -2077,7 +2077,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -533,7 +533,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -1250,7 +1250,7 @@
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"TAVILY_API_KEY\"] = userdata.get('TAVILY_API_KEY') or \"ENTER TAVILY_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -1559,7 +1559,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -2159,7 +2159,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -698,7 +698,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -592,7 +592,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -572,7 +572,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -580,7 +580,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -1075,7 +1075,7 @@
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"EXA_API_KEY\"] = userdata.get('EXA_API_KEY') or \"ENTER EXA_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -667,7 +667,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -1947,7 +1947,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -666,7 +666,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -475,7 +475,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -2130,7 +2130,7 @@
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"SERPER_API_KEY\"] = userdata.get('SERPER_API_KEY') or \"ENTER SERPER_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -635,7 +635,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -564,7 +564,7 @@
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"TAVILY_API_KEY\"] = userdata.get('TAVILY_API_KEY') or \"ENTER TAVILY_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -564,7 +564,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -614,7 +614,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
"\n",
|
||||
"# Set up OpenAI API key (add to Google Colab secrets)\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\""
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\""
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ roles:
|
||||
verbose: true
|
||||
allow_delegation: false
|
||||
llm:
|
||||
model: "gpt-4o-mini"
|
||||
model: "gpt-5-nano"
|
||||
temperature: 0.3
|
||||
tools:
|
||||
- "InternetSearchTool"
|
||||
@@ -76,7 +76,7 @@ roles:
|
||||
verbose: true
|
||||
allow_delegation: false
|
||||
llm:
|
||||
model: "gpt-4o-mini"
|
||||
model: "gpt-5-nano"
|
||||
temperature: 0.3
|
||||
tools:
|
||||
- "InternetSearchTool"
|
||||
@@ -130,7 +130,7 @@ roles:
|
||||
verbose: true
|
||||
allow_delegation: false
|
||||
llm:
|
||||
model: "gpt-4o-mini"
|
||||
model: "gpt-5-nano"
|
||||
temperature: 0.3
|
||||
tools:
|
||||
- "InternetSearchTool"
|
||||
@@ -185,7 +185,7 @@ roles:
|
||||
verbose: true
|
||||
allow_delegation: false
|
||||
llm:
|
||||
model: "gpt-4o-mini"
|
||||
model: "gpt-5-nano"
|
||||
temperature: 0.4
|
||||
tools:
|
||||
- "InternetSearchTool"
|
||||
@@ -239,7 +239,7 @@ roles:
|
||||
verbose: true
|
||||
allow_delegation: false
|
||||
llm:
|
||||
model: "gpt-4o-mini"
|
||||
model: "gpt-5-nano"
|
||||
temperature: 0.3
|
||||
tools:
|
||||
- "InternetSearchTool"
|
||||
@@ -299,7 +299,7 @@ roles:
|
||||
verbose: true
|
||||
allow_delegation: false
|
||||
llm:
|
||||
model: "gpt-4o-mini"
|
||||
model: "gpt-5-nano"
|
||||
temperature: 0.3
|
||||
tasks:
|
||||
report_synthesis:
|
||||
|
||||
@@ -462,7 +462,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -380,7 +380,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -540,7 +540,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -2639,7 +2639,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -1835,7 +1835,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -623,7 +623,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -635,7 +635,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -582,7 +582,7 @@
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-4o-mini\"\n",
|
||||
"os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
|
||||
@@ -10,7 +10,7 @@ PraisonAI now supports intelligent multi-provider and multi-model capabilities,
|
||||
- Supports fallback mechanisms for reliability
|
||||
|
||||
### 2. **Cost Optimization**
|
||||
- Routes simple tasks to cheaper models (e.g., GPT-4o-mini, Gemini Flash)
|
||||
- Routes simple tasks to cheaper models (e.g., gpt-5-nano, Gemini Flash)
|
||||
- Reserves expensive models for complex tasks
|
||||
- Tracks usage and provides cost estimates
|
||||
|
||||
@@ -46,7 +46,7 @@ agent = RouterAgent(
|
||||
name="Smart Assistant",
|
||||
role="Adaptive AI Assistant",
|
||||
goal="Complete tasks using the most appropriate model",
|
||||
models=["gpt-4o-mini", "gpt-4o", "claude-3-5-sonnet-20241022"],
|
||||
models=["gpt-5-nano", "gpt-4o", "claude-3-5-sonnet-20241022"],
|
||||
routing_strategy="auto" # Automatic model selection
|
||||
)
|
||||
|
||||
@@ -90,7 +90,7 @@ analyzer = RouterAgent(
|
||||
goal="Analyze data efficiently",
|
||||
models={
|
||||
"gemini/gemini-1.5-flash": {},
|
||||
"gpt-4o-mini": {},
|
||||
"gpt-5-nano": {},
|
||||
"claude-3-haiku-20240307": {}
|
||||
},
|
||||
model_router=router,
|
||||
@@ -130,7 +130,7 @@ The system includes pre-configured profiles for popular models:
|
||||
|
||||
| Model | Provider | Best For | Cost/1k tokens |
|
||||
|-------|----------|----------|----------------|
|
||||
| gpt-4o-mini | OpenAI | Simple tasks, speed | $0.00075 |
|
||||
| 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 |
|
||||
@@ -160,7 +160,7 @@ print(report)
|
||||
'agent_name': 'Smart Assistant',
|
||||
'routing_strategy': 'auto',
|
||||
'model_usage': {
|
||||
'gpt-4o-mini': {'calls': 5, 'tokens': 1500, 'cost': 0.0011},
|
||||
'gpt-5-nano': {'calls': 5, 'tokens': 1500, 'cost': 0.0011},
|
||||
'gpt-4o': {'calls': 2, 'tokens': 3000, 'cost': 0.0225}
|
||||
},
|
||||
'total_cost_estimate': 0.0236,
|
||||
@@ -207,7 +207,7 @@ for i, agent in enumerate(auto.agents):
|
||||
name=agent.name,
|
||||
role=agent.role,
|
||||
goal=agent.goal,
|
||||
models=["gpt-4o-mini", "gpt-4o", "claude-3-5-sonnet"],
|
||||
models=["gpt-5-nano", "gpt-4o", "claude-3-5-sonnet"],
|
||||
routing_strategy="auto"
|
||||
)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ def demonstrate_basic_context_generation():
|
||||
|
||||
# Create a ContextAgent using the factory function
|
||||
context_agent = create_context_agent(
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
name="Basic Context Engineer",
|
||||
verbose=True
|
||||
)
|
||||
@@ -133,7 +133,7 @@ def demonstrate_context_agent_as_tool():
|
||||
print("=" * 60)
|
||||
|
||||
# Create ContextAgent
|
||||
context_agent = create_context_agent(llm="gpt-4o-mini")
|
||||
context_agent = create_context_agent(llm="gpt-5-nano")
|
||||
|
||||
# Example scenario: Product planning workflow
|
||||
project_path = str(project_root)
|
||||
@@ -186,7 +186,7 @@ def show_context_engineering_benefits():
|
||||
|
||||
# Context Engineering approach
|
||||
print("\n✅ Context Engineering Approach:")
|
||||
context_agent = create_context_agent(llm="gpt-4o-mini")
|
||||
context_agent = create_context_agent(llm="gpt-5-nano")
|
||||
|
||||
# Generate comprehensive context
|
||||
analysis = context_agent.analyze_codebase_patterns(str(project_root))
|
||||
|
||||
@@ -13,7 +13,7 @@ image_agent = Agent(
|
||||
goal="Analyze images and videos to extract meaningful information",
|
||||
backstory="""You are an expert in computer vision and image analysis.
|
||||
You excel at describing images, detecting objects, and understanding visual content.""",
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
self_reflect=False
|
||||
)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ image_agent = Agent(
|
||||
goal="Analyze images and videos to extract meaningful information",
|
||||
backstory="""You are an expert in computer vision and image analysis.
|
||||
You excel at describing images, detecting objects, and understanding visual content.""",
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
self_reflect=False
|
||||
)
|
||||
|
||||
|
||||
@@ -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-4o-mini", "gpt-4o", "claude-3-5-sonnet-20241022"],
|
||||
models=["gpt-5-nano", "gpt-4o", "claude-3-5-sonnet-20241022"],
|
||||
routing_strategy="auto", # Automatic model selection
|
||||
verbose=True
|
||||
)
|
||||
@@ -81,7 +81,7 @@ def example_cost_optimized_workflow():
|
||||
goal="Analyze data efficiently while minimizing costs",
|
||||
models={
|
||||
"gemini/gemini-1.5-flash": {},
|
||||
"gpt-4o-mini": {},
|
||||
"gpt-5-nano": {},
|
||||
"deepseek-chat": {}
|
||||
},
|
||||
model_router=cost_router,
|
||||
@@ -144,7 +144,7 @@ def example_auto_agents_multi_provider():
|
||||
auto_agents = AutoAgents(
|
||||
instructions="Create a market research report on electric vehicles. Include data analysis, competitor analysis, and future projections.",
|
||||
max_agents=3,
|
||||
llm="gpt-4o-mini", # Default model for agent generation
|
||||
llm="gpt-5-nano", # Default model for agent generation
|
||||
verbose=True
|
||||
)
|
||||
|
||||
@@ -158,7 +158,7 @@ def example_auto_agents_multi_provider():
|
||||
goal=agent.goal,
|
||||
backstory=agent.backstory,
|
||||
tools=agent.tools,
|
||||
models=["gpt-4o-mini", "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-4o"],
|
||||
routing_strategy="auto",
|
||||
verbose=True
|
||||
)
|
||||
|
||||
@@ -18,7 +18,7 @@ from praisonaiagents.tools import duckduckgo
|
||||
|
||||
# Define model options with cost considerations
|
||||
# Using different models for different complexity levels
|
||||
cheap_model = "gpt-4o-mini" # For simple tasks
|
||||
cheap_model = "gpt-5-nano" # For simple tasks
|
||||
balanced_model = "gpt-4o" # For moderate complexity
|
||||
premium_model = "claude-3-5-sonnet-20241022" # For complex tasks
|
||||
|
||||
@@ -76,7 +76,7 @@ print("\n" + "="*80)
|
||||
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-4o-mini)")
|
||||
print("- Simple factual questions → Cheaper model (gpt-5-nano)")
|
||||
print("- Moderate analysis tasks → Balanced model (gpt-4o)")
|
||||
print("- Complex strategic analysis → Premium model (claude-3-5-sonnet)")
|
||||
print("- This approach optimizes costs while maintaining quality for each task type")
|
||||
@@ -7,7 +7,7 @@ video_agent = Agent(
|
||||
goal="Analyze images and videos to extract meaningful information",
|
||||
backstory="""You are an expert in computer vision and image analysis.
|
||||
You excel at describing images, detecting objects, and understanding visual content.""",
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
self_reflect=False
|
||||
)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ from praisonaiagents import Agent, MCP
|
||||
|
||||
qa_agent = Agent(
|
||||
instructions="""You are a Question Answering Agent.""",
|
||||
llm="openai/gpt-4o-mini",
|
||||
llm="openai/gpt-5-nano",
|
||||
tools=MCP("http://localhost:8080/agents/sse")
|
||||
)
|
||||
|
||||
|
||||
@@ -2,17 +2,17 @@ from praisonaiagents import Agent
|
||||
|
||||
weather_agent = Agent(
|
||||
instructions="""You are a weather agent that can provide weather information for a given city.""",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
stock_agent = Agent(
|
||||
instructions="""You are a stock market agent that can provide information about stock prices and market trends.""",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
travel_agent = Agent(
|
||||
instructions="""You are a travel agent that can provide recommendations for destinations, hotels, and activities.""",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
weather_agent.launch(path="/weather", port=3030)
|
||||
|
||||
@@ -2,7 +2,7 @@ from praisonaiagents import Agent, MCP
|
||||
|
||||
search_agent = Agent(
|
||||
instructions="""You are a weather agent that can provide weather information for a given city.""",
|
||||
llm="openai/gpt-4o-mini",
|
||||
llm="openai/gpt-5-nano",
|
||||
tools=MCP("http://localhost:8080/sse")
|
||||
)
|
||||
search_agent.launch(path="/weather", port=3030)
|
||||
@@ -1,4 +1,4 @@
|
||||
from praisonaiagents import Agent
|
||||
|
||||
agent = Agent(instructions="""You are a helpful assistant.""", llm="gpt-4o-mini")
|
||||
agent = Agent(instructions="""You are a helpful assistant.""", llm="gpt-5-nano")
|
||||
agent.launch(path="/ask", port=3030)
|
||||
@@ -28,7 +28,7 @@ def capture_and_analyze():
|
||||
role="Camera Feed Analyzer",
|
||||
goal="Analyze camera captures in real-time",
|
||||
backstory="Expert in real-time visual analysis with computer vision skills",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
# Initialize camera (0 for default camera)
|
||||
|
||||
@@ -42,7 +42,7 @@ class ContinuousCameraMonitor:
|
||||
role="Security Camera Analyst",
|
||||
goal="Monitor camera feeds for activities and security events",
|
||||
backstory="Expert security analyst with computer vision skills specialized in real-time monitoring",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
def capture_frame(self, cap):
|
||||
|
||||
@@ -57,7 +57,7 @@ def analyze_with_multiple_agents():
|
||||
role="Security Specialist",
|
||||
goal="Identify security threats and suspicious activities",
|
||||
backstory="Expert security analyst with years of experience in surveillance and threat detection",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
object_detector = Agent(
|
||||
@@ -65,7 +65,7 @@ def analyze_with_multiple_agents():
|
||||
role="Object Recognition Specialist",
|
||||
goal="Identify and catalog all objects in the scene",
|
||||
backstory="Computer vision expert specializing in object detection and classification",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
scene_analyst = Agent(
|
||||
@@ -73,7 +73,7 @@ def analyze_with_multiple_agents():
|
||||
role="Scene Understanding Expert",
|
||||
goal="Provide comprehensive scene analysis and context",
|
||||
backstory="Environmental analyst expert in understanding spatial relationships and scene context",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
# Create specialized tasks
|
||||
|
||||
@@ -39,7 +39,7 @@ class CameraVideoAnalyzer:
|
||||
role="Video Content Analyzer",
|
||||
goal="Analyze video content for activities, objects, and events",
|
||||
backstory="Expert in video analysis and temporal event detection with computer vision expertise",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
def record_video_segment(self, duration_seconds=10):
|
||||
|
||||
@@ -34,7 +34,7 @@ class ContextEngineeringWorkflow:
|
||||
to achieve higher success rates in AI-driven development tasks.
|
||||
"""
|
||||
|
||||
def __init__(self, project_path: str, llm: str = "gpt-4o-mini"):
|
||||
def __init__(self, project_path: str, llm: str = "gpt-5-nano"):
|
||||
self.project_path = project_path
|
||||
self.llm = llm
|
||||
self.context_data = {}
|
||||
@@ -382,7 +382,7 @@ def run_example_workflow():
|
||||
project_path = str(project_root)
|
||||
workflow = ContextEngineeringWorkflow(
|
||||
project_path=project_path,
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
# Example feature request
|
||||
@@ -446,7 +446,7 @@ if __name__ == "__main__":
|
||||
print("(Note: Full execution requires complete environment setup)")
|
||||
|
||||
project_path = str(project_root)
|
||||
workflow = ContextEngineeringWorkflow(project_path, "gpt-4o-mini")
|
||||
workflow = ContextEngineeringWorkflow(project_path, "gpt-5-nano")
|
||||
|
||||
print(f"\n✅ Workflow Setup Complete:")
|
||||
print(f" • Project path: {project_path}")
|
||||
|
||||
@@ -68,7 +68,7 @@ def method_1_simple_loop():
|
||||
goal="Process each task from the CSV file efficiently",
|
||||
backstory="Expert at handling repetitive tasks from CSV data",
|
||||
instructions="Process each task thoroughly and provide detailed output",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
# Create a loop task that will automatically process each CSV row
|
||||
@@ -127,7 +127,7 @@ def method_2_manual_csv():
|
||||
4. Create a summary of the processing results
|
||||
5. Save results to a new CSV file if needed
|
||||
""",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
# Create a task for manual CSV processing
|
||||
@@ -187,7 +187,7 @@ def method_3_url_processing():
|
||||
4. Create a detailed analysis report
|
||||
5. Save results with analysis data
|
||||
""",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
# Create the URL processing task
|
||||
@@ -264,7 +264,7 @@ def method_4_advanced_processing():
|
||||
4. Create separate files for valid and invalid data
|
||||
5. Provide detailed validation reports
|
||||
""",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
# Create a processing agent
|
||||
@@ -281,7 +281,7 @@ def method_4_advanced_processing():
|
||||
3. Generate comprehensive results
|
||||
4. Create detailed output reports
|
||||
""",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
# Create validation task
|
||||
|
||||
@@ -140,7 +140,7 @@ def main():
|
||||
instructions="You are an AI research assistant. Use your knowledge base to answer questions about artificial intelligence topics.",
|
||||
knowledge=sample_documents, # Will use default knowledge config
|
||||
knowledge_config=rerank_config, # Use reranking config
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
print("7. Agent with reranking knowledge:")
|
||||
|
||||
@@ -16,7 +16,7 @@ rag_agent = Agent(
|
||||
name="RAG Agent",
|
||||
role="Information Specialist",
|
||||
goal="Retrieve knowledge efficiently",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
# Define a task for the agent
|
||||
|
||||
@@ -2,7 +2,7 @@ from praisonaiagents import Agent, Task, PraisonAIAgents
|
||||
|
||||
agent = Agent(
|
||||
instructions="You are a loop agent that creating a loop of tasks.",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
task = Task(
|
||||
|
||||
@@ -20,7 +20,7 @@ reflection_agent = Agent(
|
||||
self_reflect=True,
|
||||
min_reflect=2,
|
||||
max_reflect=4,
|
||||
reflect_llm="gpt-4o-mini",
|
||||
reflect_llm="gpt-5-nano",
|
||||
verbose=True
|
||||
)
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ def main():
|
||||
goal="Analyze each URL from the CSV list",
|
||||
backstory="Expert at analyzing websites and URLs",
|
||||
instructions="Analyze each URL and provide insights about the website",
|
||||
llm="gpt-4o-mini" # You can change this to any supported model
|
||||
llm="gpt-5-nano" # You can change this to any supported model
|
||||
)
|
||||
|
||||
# Step 3: Create a task that will loop through the CSV
|
||||
|
||||
@@ -27,7 +27,7 @@ def example_with_tool():
|
||||
role="Information Researcher",
|
||||
goal="Research and provide information",
|
||||
tools=[latency_tracking_tool], # Add our custom tool
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
# Start tracking manually
|
||||
@@ -60,7 +60,7 @@ def example_with_wrappers():
|
||||
name="Analyst",
|
||||
role="Data Analyst",
|
||||
goal="Analyze data and provide insights",
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
request_id="request_2" # Unique request ID
|
||||
)
|
||||
|
||||
@@ -83,7 +83,7 @@ def example_with_context_manager():
|
||||
name="Calculator",
|
||||
role="Math Expert",
|
||||
goal="Solve mathematical problems",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
request_id = "request_3"
|
||||
@@ -126,7 +126,7 @@ def example_mcp_tracking():
|
||||
name="Assistant",
|
||||
role="MCP Assistant",
|
||||
goal="Handle MCP requests",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
plan = agent.chat("Plan: Search for Python documentation")
|
||||
|
||||
@@ -166,7 +166,7 @@ def example_concurrent_tracking():
|
||||
name=f"Agent_{i}",
|
||||
role="Concurrent Worker",
|
||||
goal="Process requests concurrently",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
with tracker.track("processing", request_id):
|
||||
|
||||
@@ -56,7 +56,7 @@ def create_mcp_agent_with_tracking(request_id: str = "mcp_request"):
|
||||
name="MCPAssistant",
|
||||
role="MCP Request Handler",
|
||||
goal="Handle MCP requests with latency tracking",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
return agent
|
||||
|
||||
@@ -23,7 +23,7 @@ def handle_mcp_request(query: str, request_id: str = "mcp_1"):
|
||||
name="Assistant",
|
||||
role="MCP Handler",
|
||||
goal="Process requests",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
plan = f"I will search for information about {query}"
|
||||
time.sleep(0.1) # Simulate planning time
|
||||
|
||||
@@ -29,7 +29,7 @@ qa_generator = Agent(
|
||||
role="Question Creator",
|
||||
goal="Create challenging math and logic questions",
|
||||
backstory="Expert in educational content creation",
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
tools=[write_csv, count_questions]
|
||||
)
|
||||
|
||||
@@ -38,7 +38,7 @@ total_questions_evaluator = Agent(
|
||||
role="Total Questions Evaluator",
|
||||
goal="Evaluate the total number of questions in qa_pairs.csv file",
|
||||
backstory="Expert in evaluating the total number of questions in a file",
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
tools=[count_questions],
|
||||
verbose=False
|
||||
)
|
||||
@@ -49,7 +49,7 @@ cot_generator = Agent(
|
||||
goal="Generate and manage chain of thought solutions for Q&A pairs",
|
||||
backstory="Expert in breaking down problems and generating detailed solution steps",
|
||||
tools=[cot_save],
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
verbose=False
|
||||
)
|
||||
|
||||
@@ -59,7 +59,7 @@ upload_to_huggingface = Agent(
|
||||
goal="Upload the generated chain of thought solutions to a Huggingface dataset",
|
||||
backstory="Expert in saving data to Huggingface",
|
||||
tools=[cot_upload_to_huggingface],
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
verbose=False
|
||||
)
|
||||
|
||||
|
||||
@@ -23,13 +23,13 @@ def code_interpreter(code: str):
|
||||
|
||||
code_agent = Agent(
|
||||
name="code_agent",
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
backstory="Expert in writing Python scripts",
|
||||
self_reflect=False
|
||||
)
|
||||
execution_agent = Agent(
|
||||
name="execution_agent",
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
backstory="Expert in executing Python scripts",
|
||||
self_reflect=False,
|
||||
tools=[code_interpreter]
|
||||
|
||||
@@ -33,14 +33,14 @@ def main():
|
||||
role="Research Analyst",
|
||||
goal="Research and document key information about topics",
|
||||
backstory="Expert at analyzing and storing information in memory",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
retriever = Agent(
|
||||
role="Information Retriever",
|
||||
goal="Retrieve and verify stored information from memory",
|
||||
backstory="Specialist in searching and validating information from memory",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
# Task 1: Process the facts
|
||||
|
||||
@@ -9,19 +9,19 @@ fact3 = "The year the first Josinga was released is 2007"
|
||||
fact_agent = Agent(
|
||||
name="Fact Agent",
|
||||
instructions="You are a fact agent, you store and retrieve facts in memory",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
research_agent = Agent(
|
||||
name="Research Agent",
|
||||
instructions="You are a research analyst, you research and document key points about topics",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
blog_agent = Agent(
|
||||
name="Blog Agent",
|
||||
instructions="You are a blog writer, you write a blog post about the research",
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
fact_task = Task(
|
||||
|
||||
@@ -7,7 +7,7 @@ vision_agent = Agent(
|
||||
goal="Analyze images and videos to extract meaningful information",
|
||||
backstory="""You are an expert in computer vision and image analysis.
|
||||
You excel at describing images, detecting objects, and understanding visual content.""",
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
self_reflect=False
|
||||
)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ researcher = Agent(
|
||||
goal="Analyze and structure information about AI developments",
|
||||
backstory="Expert analyst specializing in AI technology trends",
|
||||
verbose=True,
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
tools=[Tools.internet_search],
|
||||
self_reflect=False
|
||||
)
|
||||
@@ -25,7 +25,7 @@ analyst = Agent(
|
||||
goal="Structure and analyze research findings",
|
||||
backstory="Senior data analyst with expertise in pattern recognition",
|
||||
verbose=True,
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
self_reflect=False
|
||||
)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ def get_structured_analysis(query: str, verbose: bool = True) -> AnalysisReport:
|
||||
verbose=verbose,
|
||||
self_reflect=True, # Enable self-reflection for better quality
|
||||
markdown=True,
|
||||
llm="gpt-4o-mini"
|
||||
llm="gpt-5-nano"
|
||||
)
|
||||
|
||||
# Create the analysis prompt
|
||||
|
||||
@@ -16,7 +16,7 @@ class DynamicAgentSystem:
|
||||
def __init__(self):
|
||||
self.user_preferences = {}
|
||||
self.llm_config = {
|
||||
"model": os.getenv("LLM_MODEL", "gpt-4o-mini"),
|
||||
"model": os.getenv("LLM_MODEL", "gpt-5-nano"),
|
||||
"temperature": 0.7
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ default_topic = os.getenv("RESEARCH_TOPIC", "AI trends")
|
||||
user_topic = input(f"Topic to research [{default_topic}]: ") or default_topic
|
||||
|
||||
# Get other configuration from environment
|
||||
llm_model = os.getenv("LLM_MODEL", "gpt-4o-mini")
|
||||
llm_model = os.getenv("LLM_MODEL", "gpt-5-nano")
|
||||
temperature = float(os.getenv("LLM_TEMPERATURE", "0.7"))
|
||||
max_retries = int(os.getenv("MAX_RETRIES", "3"))
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ with st.sidebar:
|
||||
# Model selection
|
||||
model = st.selectbox(
|
||||
"Select Model",
|
||||
["gpt-4o-mini", "gpt-4o", "gpt-3.5-turbo", "claude-3-opus"],
|
||||
["gpt-5-nano", "gpt-4o", "gpt-3.5-turbo", "claude-3-opus"],
|
||||
index=0
|
||||
)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ from praisonaiagents import Agent, MCP
|
||||
|
||||
search_agent = Agent(
|
||||
instructions="""You help book apartments on Airbnb.""",
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
tools=MCP("npx -y @openbnb/mcp-server-airbnb --ignore-robots-txt")
|
||||
)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ aws_region = os.getenv("AWS_REGION")
|
||||
aws_kb_agent = Agent(
|
||||
instructions="""You are a helpful assistant that can interact with AWS Knowledge Base.
|
||||
Use the available tools when relevant to retrieve and process AWS information.""",
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
tools=MCP("npx -y @modelcontextprotocol/server-aws-kb-retrieval",
|
||||
env={
|
||||
"AWS_ACCESS_KEY_ID": aws_access_key,
|
||||
|
||||
@@ -8,7 +8,7 @@ brave_api_key = os.getenv("BRAVE_API_KEY")
|
||||
search_agent = Agent(
|
||||
instructions="""You are a helpful assistant that can search the web for information.
|
||||
Use the available tools when relevant to answer user questions.""",
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
tools=MCP("npx -y @modelcontextprotocol/server-brave-search", env={"BRAVE_API_KEY": brave_api_key})
|
||||
)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ from praisonaiagents import Agent, MCP
|
||||
agent = Agent(
|
||||
instructions="""You are a helpful assistant that can check stock prices and perform other tasks.
|
||||
Use the available tools when relevant to answer user questions.""",
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
tools = MCP("/Users/praison/miniconda3/envs/mcp/bin/python /Users/praison/stockprice/app.py")
|
||||
)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ databutton_api_key = os.getenv("DATABUTTON_API_KEY")
|
||||
databutton_agent = Agent(
|
||||
instructions="""You are a helpful assistant that can interact with Databutton.
|
||||
Use the available tools when relevant to answer user questions.""",
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
tools=MCP("uvx databutton-app-mcp@latest", env={"DATABUTTON_API_KEY": databutton_api_key})
|
||||
)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ everart_api_key = os.getenv("EVERART_API_KEY")
|
||||
everart_agent = Agent(
|
||||
instructions="""You are a helpful assistant that can interact with Everart.
|
||||
Use the available tools when relevant to generate and manage art.""",
|
||||
llm="gpt-4o-mini",
|
||||
llm="gpt-5-nano",
|
||||
tools=MCP("npx -y @modelcontextprotocol/server-everart",
|
||||
env={"EVERART_API_KEY": everart_api_key})
|
||||
)
|
||||
|
||||
Loaded 100 of 348 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user