mirror of
https://github.com/MervinPraison/PraisonAI.git
synced 2026-11-08 17:31:00 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2220114809 | ||
|
|
9fe4dbc172 | ||
|
|
180503fcd5 |
No files matched your search
@@ -152,6 +152,10 @@ praisonai research "What are the latest AI trends in 2025?"
|
||||
# Use Gemini
|
||||
praisonai research --model deep-research-pro "Your research query"
|
||||
|
||||
# Save output to file (output/research/{query}.md)
|
||||
praisonai research --save "Your research query"
|
||||
praisonai research -s "Your research query"
|
||||
|
||||
# Verbose mode (show debug logs)
|
||||
praisonai research -v "Your research query"
|
||||
```
|
||||
|
||||
+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.91" \
|
||||
"praisonai>=2.2.93" \
|
||||
"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.91" \
|
||||
"praisonai>=2.2.93" \
|
||||
"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.91" \
|
||||
"praisonai>=2.2.93" \
|
||||
"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.91" \
|
||||
"praisonai>=2.2.93" \
|
||||
"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.91`
|
||||
- PraisonAI: `>=2.2.93`
|
||||
- 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.91" "praisonaiagents==0.0.92"
|
||||
RUN pip install "praisonai==2.2.93" "praisonaiagents==0.0.92"
|
||||
```
|
||||
|
||||
## 🌐 Production Deployment
|
||||
|
||||
@@ -254,7 +254,17 @@ class DeepResearchAgent:
|
||||
max_wait_time: Maximum seconds to wait for research completion
|
||||
"""
|
||||
self.name = name or "DeepResearchAgent"
|
||||
self.instructions = instructions
|
||||
# Default instructions for comprehensive research
|
||||
default_instructions = """
|
||||
You are a professional research analyst. When conducting research:
|
||||
- Include specific figures, trends, statistics, and measurable outcomes
|
||||
- Prioritize reliable, up-to-date sources: peer-reviewed research, official organizations, regulatory agencies
|
||||
- Include inline citations and return all source metadata
|
||||
- Be analytical, avoid generalities, and ensure data-backed reasoning
|
||||
- Structure your response with clear headers and formatting
|
||||
- If creating comparisons, use tables for clarity
|
||||
"""
|
||||
self.instructions = instructions or default_instructions
|
||||
self.verbose = verbose
|
||||
self.summary_mode = summary_mode
|
||||
self.enable_web_search = enable_web_search
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "praisonaiagents"
|
||||
version = "0.0.164"
|
||||
version = "0.0.165"
|
||||
description = "Praison AI agents for completing complex tasks with Self Reflection Agents"
|
||||
requires-python = ">=3.10"
|
||||
authors = [
|
||||
|
||||
Generated
+1
-1
@@ -2422,7 +2422,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "praisonaiagents"
|
||||
version = "0.0.164"
|
||||
version = "0.0.165"
|
||||
source = { editable = "." }
|
||||
dependencies = [
|
||||
{ name = "aiohttp" },
|
||||
|
||||
@@ -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.91.tar.gz"
|
||||
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.91.tar.gz | shasum -a 256`.split.first
|
||||
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.93.tar.gz"
|
||||
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.93.tar.gz | shasum -a 256`.split.first
|
||||
license "MIT"
|
||||
|
||||
depends_on "[email protected]"
|
||||
|
||||
@@ -578,6 +578,7 @@ class PraisonAI:
|
||||
parser.add_argument("--goal", type=str, help="Goal for context engineering")
|
||||
parser.add_argument("--auto-analyze", action="store_true", help="Enable automatic analysis in context engineering")
|
||||
parser.add_argument("--research", action="store_true", help="Run deep research on a topic")
|
||||
parser.add_argument("--save", "-s", action="store_true", help="Save research output to file (output/research/)")
|
||||
parser.add_argument("--verbose", "-v", action="store_true", help="Enable verbose output for research")
|
||||
|
||||
# If we're in a test environment, parse with empty args to avoid pytest interference
|
||||
@@ -719,7 +720,8 @@ class PraisonAI:
|
||||
|
||||
research_model = getattr(args, 'model', None)
|
||||
verbose = getattr(args, 'verbose', False)
|
||||
self.handle_research_command(research_query, research_model, verbose)
|
||||
save = getattr(args, 'save', False)
|
||||
self.handle_research_command(research_query, research_model, verbose, save)
|
||||
sys.exit(0)
|
||||
|
||||
# Only check framework availability for agent-related operations
|
||||
@@ -959,7 +961,7 @@ class PraisonAI:
|
||||
print(f"[red]ERROR: Context engineering failed: {e}[/red]")
|
||||
sys.exit(1)
|
||||
|
||||
def handle_research_command(self, query: str, model: str = None, verbose: bool = False) -> str:
|
||||
def handle_research_command(self, query: str, model: str = None, verbose: bool = False, save: bool = False) -> str:
|
||||
"""
|
||||
Handle the research command by creating a DeepResearchAgent and running it.
|
||||
|
||||
@@ -967,6 +969,7 @@ class PraisonAI:
|
||||
query: Research query/topic
|
||||
model: Model for deep research (optional, defaults to o4-mini-deep-research)
|
||||
verbose: Enable verbose output (default: False)
|
||||
save: Save output to file (default: False)
|
||||
|
||||
Returns:
|
||||
str: Research report
|
||||
@@ -1011,6 +1014,42 @@ class PraisonAI:
|
||||
if url:
|
||||
print(f" {url}")
|
||||
|
||||
# Save output to file if --save flag is set
|
||||
if save:
|
||||
import re
|
||||
# Get first 10 words from query for filename
|
||||
words = query.split()[:10]
|
||||
filename_base = ' '.join(words)
|
||||
# Sanitize filename: remove invalid characters
|
||||
filename_base = re.sub(r'[<>:"/\\|?*\x00-\x1f]', '', filename_base)
|
||||
filename_base = filename_base.strip()[:100] # Limit length
|
||||
if not filename_base:
|
||||
filename_base = "research_output"
|
||||
|
||||
# Create output directory
|
||||
output_dir = os.path.join(os.getcwd(), "output", "research")
|
||||
os.makedirs(output_dir, exist_ok=True)
|
||||
|
||||
# Build markdown content
|
||||
md_content = f"# {query}\n\n"
|
||||
md_content += result.report
|
||||
if result.citations:
|
||||
md_content += "\n\n## Citations\n\n"
|
||||
for i, citation in enumerate(result.citations, 1):
|
||||
title = getattr(citation, 'title', 'Untitled')
|
||||
url = getattr(citation, 'url', '')
|
||||
if url:
|
||||
md_content += f"{i}. [{title}]({url})\n"
|
||||
else:
|
||||
md_content += f"{i}. {title}\n"
|
||||
|
||||
# Save to file
|
||||
output_path = os.path.join(output_dir, f"{filename_base}.md")
|
||||
with open(output_path, 'w', encoding='utf-8') as f:
|
||||
f.write(md_content)
|
||||
|
||||
print(f"\n[bold green]Saved to:[/bold green] {output_path}")
|
||||
|
||||
return result.report
|
||||
|
||||
except ImportError as e:
|
||||
|
||||
@@ -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.91 gunicorn markdown\n")
|
||||
file.write("RUN pip install flask praisonai==2.2.93 gunicorn markdown\n")
|
||||
file.write("EXPOSE 8080\n")
|
||||
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "PraisonAI"
|
||||
version = "2.2.91"
|
||||
version = "2.2.93"
|
||||
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.164",
|
||||
"praisonaiagents>=0.0.165",
|
||||
"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.91"
|
||||
version = "2.2.93"
|
||||
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.164"
|
||||
praisonaiagents = ">=0.0.165"
|
||||
python-dotenv = ">=0.19.0"
|
||||
instructor = ">=1.3.3"
|
||||
PyYAML = ">=6.0"
|
||||
|
||||
Generated
+5
-5
@@ -4044,7 +4044,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "praisonai"
|
||||
version = "2.2.91"
|
||||
version = "2.2.93"
|
||||
source = { editable = "." }
|
||||
dependencies = [
|
||||
{ name = "instructor" },
|
||||
@@ -4198,7 +4198,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.164" },
|
||||
{ name = "praisonaiagents", specifier = ">=0.0.165" },
|
||||
{ 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" },
|
||||
@@ -4253,7 +4253,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "praisonaiagents"
|
||||
version = "0.0.164"
|
||||
version = "0.0.165"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "aiohttp" },
|
||||
@@ -4262,9 +4262,9 @@ dependencies = [
|
||||
{ name = "pydantic" },
|
||||
{ name = "rich" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/2c/eb/511bba04297741c3e87356eed89a06c1d09cecaff7c697b123724b910aa7/praisonaiagents-0.0.164.tar.gz", hash = "sha256:de81af1ec01135e9ac74ad6f1142d5540ee0de915456da11136b6d553739dd87", size = 298046, upload-time = "2025-12-13T02:08:11.308Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/c3/49/37f8518b2205760cec66ac44482c1cb9e33c0cb568c4c6cb07f9908dceb3/praisonaiagents-0.0.165.tar.gz", hash = "sha256:b2a43a44d51454f9917a2345407bf86fdc46046bafac96601c98d1d21fb2601a", size = 298269, upload-time = "2025-12-13T02:18:34.883Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/40/7d/3fe827761842b2bb0d1a05d0b4375bff003000aec04b99ddb946ec9f9aaf/praisonaiagents-0.0.164-py3-none-any.whl", hash = "sha256:ebd15e61e9d70c3a851adf526ace418ec7d80042819e0a3b3725cb2bf1e86e39", size = 315109, upload-time = "2025-12-13T02:08:09.722Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/26/e7/c3b21f4c68629612ab4e4d128fca5fdabe141df16b0861679e2736adebe7/praisonaiagents-0.0.165-py3-none-any.whl", hash = "sha256:65b880f6d4c5d05fadf86153338306e12004316da9dc9f83942b9e16f2133851", size = 315370, upload-time = "2025-12-13T02:18:33.197Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
Reference in new issue
Block a user