Skip to content

Commit b18d600

Browse files
committed
Release v3.9.31
1 parent c656af3 commit b18d600

File tree

8 files changed

+39
-12
lines changed

8 files changed

+39
-12
lines changed

docker/Dockerfile.chat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN mkdir -p /root/.praison
1616
# Install Python packages (using latest versions)
1717
RUN pip install --no-cache-dir \
1818
praisonai_tools \
19-
"praisonai>=3.9.30" \
19+
"praisonai>=3.9.31" \
2020
"praisonai[chat]" \
2121
"embedchain[github,youtube]"
2222

docker/Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN mkdir -p /root/.praison
2020
# Install Python packages (using latest versions)
2121
RUN pip install --no-cache-dir \
2222
praisonai_tools \
23-
"praisonai>=3.9.30" \
23+
"praisonai>=3.9.31" \
2424
"praisonai[ui]" \
2525
"praisonai[chat]" \
2626
"praisonai[realtime]" \

docker/Dockerfile.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN mkdir -p /root/.praison
1616
# Install Python packages (using latest versions)
1717
RUN pip install --no-cache-dir \
1818
praisonai_tools \
19-
"praisonai>=3.9.30" \
19+
"praisonai>=3.9.31" \
2020
"praisonai[ui]" \
2121
"praisonai[crewai]"
2222

src/praisonai/praisonai.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ class Praisonai < Formula
33

44
desc "AI tools for various AI applications"
55
homepage "https://github.com/MervinPraison/PraisonAI"
6-
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v3.9.30.tar.gz"
7-
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v3.9.30.tar.gz | shasum -a 256`.split.first
6+
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v3.9.31.tar.gz"
7+
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v3.9.31.tar.gz | shasum -a 256`.split.first
88
license "MIT"
99

1010
depends_on "python@3.11"

src/praisonai/praisonai/cli/features/recipe.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,11 @@ def cmd_list(self, args: List[str]) -> int:
338338
table.add_column("Tags", style="yellow")
339339

340340
for r in recipes:
341+
desc = r.description or ""
341342
table.add_row(
342343
r.name,
343-
r.version,
344-
r.description[:50] + "..." if len(r.description) > 50 else r.description,
344+
r.version or "",
345+
desc[:50] + "..." if len(desc) > 50 else desc,
345346
", ".join(r.tags[:3]) if r.tags else "",
346347
)
347348

src/praisonai/praisonai/deploy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def create_dockerfile(self):
5757
file.write("FROM python:3.11-slim\n")
5858
file.write("WORKDIR /app\n")
5959
file.write("COPY . .\n")
60-
file.write("RUN pip install flask praisonai==3.9.30 gunicorn markdown\n")
60+
file.write("RUN pip install flask praisonai==3.9.31 gunicorn markdown\n")
6161
file.write("EXPOSE 8080\n")
6262
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
6363

src/praisonai/praisonai/recipe/core.py

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -670,10 +670,25 @@ def _check_dependencies(recipe_config: RecipeConfig) -> Dict[str, Any]:
670670
"external": [],
671671
}
672672

673+
# Common package name to import name mappings
674+
PACKAGE_IMPORT_MAP = {
675+
"tavily-python": "tavily",
676+
"google-generativeai": "google.generativeai",
677+
"openai-whisper": "whisper",
678+
"python-dotenv": "dotenv",
679+
"pillow": "PIL",
680+
"opencv-python": "cv2",
681+
"scikit-learn": "sklearn",
682+
"beautifulsoup4": "bs4",
683+
"pyyaml": "yaml",
684+
}
685+
673686
# Check Python packages
674687
for pkg in recipe_config.get_required_packages():
688+
# Get the correct import name
689+
import_name = PACKAGE_IMPORT_MAP.get(pkg, pkg.replace("-", "_"))
675690
try:
676-
__import__(pkg.replace("-", "_"))
691+
__import__(import_name)
677692
result["packages"].append({"name": pkg, "available": True})
678693
except ImportError:
679694
result["packages"].append({"name": pkg, "available": False})
@@ -750,6 +765,17 @@ def _execute_recipe(
750765
# Create a TemplateConfig compatible with loader
751766
template_path = Path(recipe_config.path) if recipe_config.path else None
752767

768+
# Determine workflow file - check for agents.yaml if workflow.yaml not specified
769+
workflow_file = recipe_config.raw.get("workflow", "workflow.yaml")
770+
agents_file = recipe_config.raw.get("agents", "agents.yaml")
771+
772+
# If workflow.yaml doesn't exist but agents.yaml does, use agents.yaml as workflow
773+
if template_path:
774+
workflow_path = template_path / workflow_file
775+
agents_path = template_path / agents_file
776+
if not workflow_path.exists() and agents_path.exists():
777+
workflow_file = agents_file
778+
753779
loader_config = LoaderTemplateConfig(
754780
name=recipe_config.name,
755781
description=recipe_config.description,
@@ -758,8 +784,8 @@ def _execute_recipe(
758784
license=recipe_config.license,
759785
tags=recipe_config.tags,
760786
requires=recipe_config.requires,
761-
workflow_file=recipe_config.raw.get("workflow", "workflow.yaml"),
762-
agents_file=recipe_config.raw.get("agents", "agents.yaml"),
787+
workflow_file=workflow_file,
788+
agents_file=agents_file,
763789
config_schema=recipe_config.config_schema,
764790
defaults=merged_config,
765791
skills=recipe_config.raw.get("skills", []),

src/praisonai/praisonai/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.9.30"
1+
__version__ = "3.9.31"

0 commit comments

Comments
 (0)