Compare commits

...
1 Commits
15 changed files with 46 additions and 57 deletions

No files matched your search

+1 -1
View File
@@ -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.74" \
"praisonai>=2.2.75" \
"praisonai[api]" \
gunicorn \
markdown
+1 -1
View File
@@ -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.74" \
"praisonai>=2.2.75" \
"praisonai[chat]" \
"embedchain[github,youtube]"
+1 -1
View File
@@ -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.74" \
"praisonai>=2.2.75" \
"praisonai[ui]" \
"praisonai[chat]" \
"praisonai[realtime]" \
+1 -1
View File
@@ -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.74" \
"praisonai>=2.2.75" \
"praisonai[ui]" \
"praisonai[crewai]"
+2 -2
View File
@@ -121,7 +121,7 @@ healthcheck:
## 📦 Package Versions
All Docker images use consistent, up-to-date versions:
- PraisonAI: `>=2.2.74`
- PraisonAI: `>=2.2.75`
- 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.74" "praisonaiagents==0.0.92"
RUN pip install "praisonai==2.2.75" "praisonaiagents==0.0.92"
```
## 🌐 Production Deployment
@@ -59,7 +59,7 @@ def _configure_loggers():
# When DEBUG is set, allow some HTTP logging for API endpoints
if loglevel == 'DEBUG':
allowed_debug_loggers = {"httpx._client", "openai._client"}
allowed_debug_loggers = {"httpx", "httpx._client", "openai._client"}
for logger_name in _get_all_noisy_loggers():
if logger_name not in allowed_debug_loggers:
@@ -331,8 +331,15 @@ class Agent:
# Configure logging to suppress unwanted outputs
logging.getLogger("litellm").setLevel(logging.WARNING)
logging.getLogger("httpx").setLevel(logging.WARNING)
logging.getLogger("httpcore").setLevel(logging.WARNING)
# Allow httpx logging when LOGLEVEL=debug, otherwise suppress it
loglevel = os.environ.get('LOGLEVEL', 'INFO').upper()
if loglevel == 'DEBUG':
logging.getLogger("httpx").setLevel(logging.INFO)
logging.getLogger("httpcore").setLevel(logging.INFO)
else:
logging.getLogger("httpx").setLevel(logging.WARNING)
logging.getLogger("httpcore").setLevel(logging.WARNING)
# If instructions are provided, use them to set role, goal, and backstory
if instructions:
@@ -1229,14 +1236,14 @@ Your Goal: {self.goal}"""
border_style="green",
expand=False
)
else:
# No content yet: show generating message
return Panel(
f"[bold cyan]Generating response...[/bold cyan]",
title=f"[bold]{self.name}[/bold] - {elapsed:.1f}s",
border_style="cyan",
expand=False
)
# else:
# # No content yet: show generating message
# return Panel(
# f"[bold cyan]Generating response...[/bold cyan]",
# title=f"[bold]{self.name}[/bold] - {elapsed:.1f}s",
# border_style="cyan",
# expand=False
# )
def chat(self, prompt, temperature=0.2, tools=None, output_json=None, output_pydantic=None, reasoning_steps=False, stream=None, task_name=None, task_description=None, task_id=None):
# Reset the final display flag for each new conversation
@@ -1,25 +0,0 @@
# Ollama Handling in LLM.py
The `ollama_handled` flag is used in `llm.py` (not in `agent.py`) to track whether special Ollama model handling has been applied for tool results. Here's what I found:
## Where it's used in llm.py:
- **Line 863**: `ollama_handled = False` - initialized at the beginning of the tool execution loop
- **Line 864**: Special handling logic via `_handle_ollama_model()` method
- **Line 907**: `ollama_handled = True` - set when Ollama special handling is applied
- **Line 928 & 959**: Checks `if not ollama_handled` to avoid duplicate processing
## Why it's needed:
The flag prevents duplicate processing when Ollama models require special handling. Some Ollama models return only the tool call JSON without processing the results, requiring a follow-up prompt to get the final answer. The `ollama_handled` flag ensures this special handling happens only once.
## Does this contradict the requirement?
**No, it doesn't.** The issue states:
> "ollama/xxxx model is already handled via llm.py via litellm, so no special condition or handling required for ollama inside agent.py"
✅ **Current implementation is correct:**
- `agent.py` has NO ollama-specific conditions (only one documentation mention as an example)
- All ollama handling is contained within `llm.py` as intended
- The `ollama_handled` flag is an internal implementation detail within `llm.py`
The codebase already follows the desired pattern where ollama models are handled through the generic LLM interface via litellm without special conditions in agent.py.
@@ -201,7 +201,14 @@ class LLM:
# These are from external libraries and not useful for debugging user code
logging.getLogger("litellm.utils").setLevel(logging.WARNING)
logging.getLogger("litellm.main").setLevel(logging.WARNING)
logging.getLogger("litellm.llms.custom_httpx.http_handler").setLevel(logging.WARNING)
# Allow httpx logging when LOGLEVEL=debug, otherwise suppress it
loglevel = os.environ.get('LOGLEVEL', 'INFO').upper()
if loglevel == 'DEBUG':
logging.getLogger("litellm.llms.custom_httpx.http_handler").setLevel(logging.INFO)
else:
logging.getLogger("litellm.llms.custom_httpx.http_handler").setLevel(logging.WARNING)
logging.getLogger("litellm.litellm_logging").setLevel(logging.WARNING)
logging.getLogger("litellm.transformation").setLevel(logging.WARNING)
litellm.suppress_debug_messages = True
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "praisonaiagents"
version = "0.0.147"
version = "0.0.148"
description = "Praison AI agents for completing complex tasks with Self Reflection Agents"
requires-python = ">=3.10"
authors = [
+1 -1
View File
@@ -2422,7 +2422,7 @@ wheels = [
[[package]]
name = "praisonaiagents"
version = "0.0.147"
version = "0.0.148"
source = { editable = "." }
dependencies = [
{ name = "aiohttp" },
+2 -2
View File
@@ -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.74.tar.gz"
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.74.tar.gz | shasum -a 256`.split.first
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.75.tar.gz"
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.75.tar.gz | shasum -a 256`.split.first
license "MIT"
depends_on "[email protected]"
+1 -1
View File
@@ -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.74 gunicorn markdown\n")
file.write("RUN pip install flask praisonai==2.2.75 gunicorn markdown\n")
file.write("EXPOSE 8080\n")
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
+4 -4
View File
@@ -1,6 +1,6 @@
[project]
name = "PraisonAI"
version = "2.2.74"
version = "2.2.75"
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.147",
"praisonaiagents>=0.0.148",
"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.74"
version = "2.2.75"
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.147"
praisonaiagents = ">=0.0.148"
python-dotenv = ">=0.19.0"
instructor = ">=1.3.3"
PyYAML = ">=6.0"
+5 -5
View File
@@ -4031,7 +4031,7 @@ wheels = [
[[package]]
name = "praisonai"
version = "2.2.74"
version = "2.2.75"
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.147" },
{ name = "praisonaiagents", specifier = ">=0.0.148" },
{ 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.147"
version = "0.0.148"
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/c7/bd/ed4688ef7290faf76f214e30e3fbdf22276d790588b91968ee71aac635f6/praisonaiagents-0.0.147.tar.gz", hash = "sha256:2c5c8d2fe1cb630218c3f0e9f0dc4c22dffd4f36d113df4d9876484603aef82c", size = 270562, upload-time = "2025-07-24T00:52:45.432Z" }
sdist = { url = "https://files.pythonhosted.org/packages/5f/29/091fbf799e1a9c350bbce1148dd57e0b9142fed62c651ac7aec0f5027a08/praisonaiagents-0.0.148.tar.gz", hash = "sha256:05466b206837387a2c8617e031eaebf2b782c38cd8bd824dac698cabc8ee6aab", size = 270726, upload-time = "2025-07-24T08:59:51.275Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/d5/02/88e446fb1232ca586646722e1db4dd94ddf5afc2cd49e6ef9b6b938309a9/praisonaiagents-0.0.147-py3-none-any.whl", hash = "sha256:9e3177346b611b5d3de0820edb16ed9fc8c1ea811f6b6392a9838cd0ade4282b", size = 288525, upload-time = "2025-07-24T00:52:43.845Z" },
{ url = "https://files.pythonhosted.org/packages/8d/95/fdbddfb89bc464d6968f9fefeb5157c6934aa7c38b6409d8d22c8eefb411/praisonaiagents-0.0.148-py3-none-any.whl", hash = "sha256:8e365f789dd2858bf41dafedf28a8f50c999a6d85152b131d5d570a18b7f9139", size = 288729, upload-time = "2025-07-24T08:59:49.836Z" },
]
[[package]]