agent-recipes 0.0.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_recipes/__init__.py +27 -0
- agent_recipes/recipe_runtime/__init__.py +28 -0
- agent_recipes/recipe_runtime/core.py +385 -0
- agent_recipes/templates/ai-ab-hook-tester/recipe.yaml +45 -0
- agent_recipes/templates/ai-ab-hook-tester/tools.py +169 -0
- agent_recipes/templates/ai-angle-generator/recipe.yaml +49 -0
- agent_recipes/templates/ai-angle-generator/tools.py +182 -0
- agent_recipes/templates/ai-api-doc-generator/README.md +59 -0
- agent_recipes/templates/ai-api-doc-generator/TEMPLATE.yaml +29 -0
- agent_recipes/templates/ai-api-tester/README.md +60 -0
- agent_recipes/templates/ai-api-tester/TEMPLATE.yaml +29 -0
- agent_recipes/templates/ai-audio-enhancer/README.md +59 -0
- agent_recipes/templates/ai-audio-enhancer/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-audio-normalizer/README.md +13 -0
- agent_recipes/templates/ai-audio-normalizer/TEMPLATE.yaml +44 -0
- agent_recipes/templates/ai-audio-splitter/README.md +14 -0
- agent_recipes/templates/ai-audio-splitter/TEMPLATE.yaml +47 -0
- agent_recipes/templates/ai-background-music-generator/README.md +59 -0
- agent_recipes/templates/ai-background-music-generator/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-background-remover/README.md +60 -0
- agent_recipes/templates/ai-background-remover/TEMPLATE.yaml +27 -0
- agent_recipes/templates/ai-barcode-scanner/README.md +60 -0
- agent_recipes/templates/ai-barcode-scanner/TEMPLATE.yaml +26 -0
- agent_recipes/templates/ai-blog-generator/README.md +59 -0
- agent_recipes/templates/ai-blog-generator/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-brief-generator/recipe.yaml +52 -0
- agent_recipes/templates/ai-brief-generator/tools.py +231 -0
- agent_recipes/templates/ai-broll-builder/recipe.yaml +47 -0
- agent_recipes/templates/ai-broll-builder/tools.py +204 -0
- agent_recipes/templates/ai-calendar-scheduler/README.md +60 -0
- agent_recipes/templates/ai-calendar-scheduler/TEMPLATE.yaml +29 -0
- agent_recipes/templates/ai-changelog-generator/README.md +14 -0
- agent_recipes/templates/ai-changelog-generator/TEMPLATE.yaml +46 -0
- agent_recipes/templates/ai-chart-generator/README.md +61 -0
- agent_recipes/templates/ai-chart-generator/TEMPLATE.yaml +32 -0
- agent_recipes/templates/ai-code-documenter/README.md +12 -0
- agent_recipes/templates/ai-code-documenter/TEMPLATE.yaml +37 -0
- agent_recipes/templates/ai-code-refactorer/README.md +59 -0
- agent_recipes/templates/ai-code-refactorer/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-code-reviewer/README.md +59 -0
- agent_recipes/templates/ai-code-reviewer/TEMPLATE.yaml +31 -0
- agent_recipes/templates/ai-color-palette-extractor/README.md +60 -0
- agent_recipes/templates/ai-color-palette-extractor/TEMPLATE.yaml +27 -0
- agent_recipes/templates/ai-comment-miner/recipe.yaml +40 -0
- agent_recipes/templates/ai-comment-miner/tools.py +141 -0
- agent_recipes/templates/ai-commit-message-generator/README.md +59 -0
- agent_recipes/templates/ai-commit-message-generator/TEMPLATE.yaml +31 -0
- agent_recipes/templates/ai-content-calendar/recipe.yaml +43 -0
- agent_recipes/templates/ai-content-calendar/tools.py +170 -0
- agent_recipes/templates/ai-context-enricher/recipe.yaml +48 -0
- agent_recipes/templates/ai-context-enricher/tools.py +258 -0
- agent_recipes/templates/ai-contract-analyzer/README.md +60 -0
- agent_recipes/templates/ai-contract-analyzer/TEMPLATE.yaml +34 -0
- agent_recipes/templates/ai-csv-cleaner/README.md +13 -0
- agent_recipes/templates/ai-csv-cleaner/TEMPLATE.yaml +45 -0
- agent_recipes/templates/ai-cta-generator/recipe.yaml +54 -0
- agent_recipes/templates/ai-cta-generator/tools.py +174 -0
- agent_recipes/templates/ai-daily-news-show/recipe.yaml +103 -0
- agent_recipes/templates/ai-daily-news-show/tools.py +308 -0
- agent_recipes/templates/ai-data-anonymizer/README.md +60 -0
- agent_recipes/templates/ai-data-anonymizer/TEMPLATE.yaml +31 -0
- agent_recipes/templates/ai-data-profiler/README.md +14 -0
- agent_recipes/templates/ai-data-profiler/TEMPLATE.yaml +42 -0
- agent_recipes/templates/ai-dependency-auditor/README.md +12 -0
- agent_recipes/templates/ai-dependency-auditor/TEMPLATE.yaml +37 -0
- agent_recipes/templates/ai-doc-translator/README.md +12 -0
- agent_recipes/templates/ai-doc-translator/TEMPLATE.yaml +41 -0
- agent_recipes/templates/ai-duplicate-finder/README.md +59 -0
- agent_recipes/templates/ai-duplicate-finder/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-ebook-converter/README.md +60 -0
- agent_recipes/templates/ai-ebook-converter/TEMPLATE.yaml +27 -0
- agent_recipes/templates/ai-email-parser/README.md +59 -0
- agent_recipes/templates/ai-email-parser/TEMPLATE.yaml +29 -0
- agent_recipes/templates/ai-etl-pipeline/README.md +60 -0
- agent_recipes/templates/ai-etl-pipeline/TEMPLATE.yaml +30 -0
- agent_recipes/templates/ai-excel-formula-generator/README.md +59 -0
- agent_recipes/templates/ai-excel-formula-generator/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-face-blur/README.md +60 -0
- agent_recipes/templates/ai-face-blur/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-fact-checker/recipe.yaml +52 -0
- agent_recipes/templates/ai-fact-checker/tools.py +279 -0
- agent_recipes/templates/ai-faq-generator/README.md +59 -0
- agent_recipes/templates/ai-faq-generator/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-file-organizer/README.md +59 -0
- agent_recipes/templates/ai-file-organizer/TEMPLATE.yaml +29 -0
- agent_recipes/templates/ai-folder-packager/README.md +15 -0
- agent_recipes/templates/ai-folder-packager/TEMPLATE.yaml +48 -0
- agent_recipes/templates/ai-form-filler/README.md +60 -0
- agent_recipes/templates/ai-form-filler/TEMPLATE.yaml +30 -0
- agent_recipes/templates/ai-hashtag-optimizer/recipe.yaml +45 -0
- agent_recipes/templates/ai-hashtag-optimizer/tools.py +134 -0
- agent_recipes/templates/ai-hook-generator/recipe.yaml +50 -0
- agent_recipes/templates/ai-hook-generator/tools.py +177 -0
- agent_recipes/templates/ai-image-captioner/README.md +59 -0
- agent_recipes/templates/ai-image-captioner/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-image-cataloger/README.md +13 -0
- agent_recipes/templates/ai-image-cataloger/TEMPLATE.yaml +39 -0
- agent_recipes/templates/ai-image-optimizer/README.md +13 -0
- agent_recipes/templates/ai-image-optimizer/TEMPLATE.yaml +43 -0
- agent_recipes/templates/ai-image-resizer/README.md +12 -0
- agent_recipes/templates/ai-image-resizer/TEMPLATE.yaml +39 -0
- agent_recipes/templates/ai-image-tagger/README.md +59 -0
- agent_recipes/templates/ai-image-tagger/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-image-upscaler/README.md +60 -0
- agent_recipes/templates/ai-image-upscaler/TEMPLATE.yaml +27 -0
- agent_recipes/templates/ai-invoice-processor/README.md +60 -0
- agent_recipes/templates/ai-invoice-processor/TEMPLATE.yaml +34 -0
- agent_recipes/templates/ai-json-to-csv/README.md +12 -0
- agent_recipes/templates/ai-json-to-csv/TEMPLATE.yaml +36 -0
- agent_recipes/templates/ai-log-analyzer/README.md +59 -0
- agent_recipes/templates/ai-log-analyzer/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-markdown-to-pdf/README.md +12 -0
- agent_recipes/templates/ai-markdown-to-pdf/TEMPLATE.yaml +40 -0
- agent_recipes/templates/ai-meeting-summarizer/README.md +59 -0
- agent_recipes/templates/ai-meeting-summarizer/TEMPLATE.yaml +32 -0
- agent_recipes/templates/ai-meta-tag-generator/README.md +59 -0
- agent_recipes/templates/ai-meta-tag-generator/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-news-capture-pack/recipe.yaml +42 -0
- agent_recipes/templates/ai-news-capture-pack/tools.py +150 -0
- agent_recipes/templates/ai-news-crawler/recipe.yaml +99 -0
- agent_recipes/templates/ai-news-crawler/tools.py +417 -0
- agent_recipes/templates/ai-news-deduper/recipe.yaml +47 -0
- agent_recipes/templates/ai-news-deduper/tools.py +235 -0
- agent_recipes/templates/ai-newsletter-generator/README.md +59 -0
- agent_recipes/templates/ai-newsletter-generator/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-note-summarizer/README.md +59 -0
- agent_recipes/templates/ai-note-summarizer/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-pdf-summarizer/README.md +12 -0
- agent_recipes/templates/ai-pdf-summarizer/TEMPLATE.yaml +40 -0
- agent_recipes/templates/ai-pdf-to-markdown/README.md +19 -0
- agent_recipes/templates/ai-pdf-to-markdown/TEMPLATE.yaml +63 -0
- agent_recipes/templates/ai-performance-analyzer/recipe.yaml +45 -0
- agent_recipes/templates/ai-performance-analyzer/tools.py +159 -0
- agent_recipes/templates/ai-podcast-cleaner/README.md +117 -0
- agent_recipes/templates/ai-podcast-cleaner/TEMPLATE.yaml +117 -0
- agent_recipes/templates/ai-podcast-cleaner/agents.yaml +59 -0
- agent_recipes/templates/ai-podcast-cleaner/workflow.yaml +77 -0
- agent_recipes/templates/ai-podcast-transcriber/README.md +59 -0
- agent_recipes/templates/ai-podcast-transcriber/TEMPLATE.yaml +32 -0
- agent_recipes/templates/ai-post-copy-generator/recipe.yaml +41 -0
- agent_recipes/templates/ai-post-copy-generator/tools.py +105 -0
- agent_recipes/templates/ai-product-description-generator/README.md +59 -0
- agent_recipes/templates/ai-product-description-generator/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-publisher-pack/recipe.yaml +44 -0
- agent_recipes/templates/ai-publisher-pack/tools.py +252 -0
- agent_recipes/templates/ai-qr-code-generator/README.md +60 -0
- agent_recipes/templates/ai-qr-code-generator/TEMPLATE.yaml +26 -0
- agent_recipes/templates/ai-regex-generator/README.md +59 -0
- agent_recipes/templates/ai-regex-generator/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-repo-readme/README.md +13 -0
- agent_recipes/templates/ai-repo-readme/TEMPLATE.yaml +42 -0
- agent_recipes/templates/ai-report-generator/README.md +61 -0
- agent_recipes/templates/ai-report-generator/TEMPLATE.yaml +32 -0
- agent_recipes/templates/ai-resume-parser/README.md +60 -0
- agent_recipes/templates/ai-resume-parser/TEMPLATE.yaml +33 -0
- agent_recipes/templates/ai-rss-aggregator/README.md +60 -0
- agent_recipes/templates/ai-rss-aggregator/TEMPLATE.yaml +30 -0
- agent_recipes/templates/ai-schema-generator/README.md +12 -0
- agent_recipes/templates/ai-schema-generator/TEMPLATE.yaml +34 -0
- agent_recipes/templates/ai-screen-recorder/recipe.yaml +43 -0
- agent_recipes/templates/ai-screen-recorder/tools.py +184 -0
- agent_recipes/templates/ai-screenshot-capture/recipe.yaml +45 -0
- agent_recipes/templates/ai-screenshot-capture/tools.py +231 -0
- agent_recipes/templates/ai-screenshot-ocr/README.md +12 -0
- agent_recipes/templates/ai-screenshot-ocr/TEMPLATE.yaml +37 -0
- agent_recipes/templates/ai-script-writer/recipe.yaml +58 -0
- agent_recipes/templates/ai-script-writer/tools.py +297 -0
- agent_recipes/templates/ai-sentiment-analyzer/README.md +59 -0
- agent_recipes/templates/ai-sentiment-analyzer/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-seo-optimizer/README.md +59 -0
- agent_recipes/templates/ai-seo-optimizer/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-signal-ranker/recipe.yaml +54 -0
- agent_recipes/templates/ai-signal-ranker/tools.py +256 -0
- agent_recipes/templates/ai-sitemap-generator/README.md +59 -0
- agent_recipes/templates/ai-sitemap-generator/TEMPLATE.yaml +26 -0
- agent_recipes/templates/ai-sitemap-scraper/README.md +13 -0
- agent_recipes/templates/ai-sitemap-scraper/TEMPLATE.yaml +41 -0
- agent_recipes/templates/ai-slide-generator/README.md +60 -0
- agent_recipes/templates/ai-slide-generator/TEMPLATE.yaml +29 -0
- agent_recipes/templates/ai-slide-to-notes/README.md +12 -0
- agent_recipes/templates/ai-slide-to-notes/TEMPLATE.yaml +37 -0
- agent_recipes/templates/ai-social-media-generator/README.md +59 -0
- agent_recipes/templates/ai-social-media-generator/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-sql-generator/README.md +59 -0
- agent_recipes/templates/ai-sql-generator/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-subtitle-generator/README.md +59 -0
- agent_recipes/templates/ai-subtitle-generator/TEMPLATE.yaml +31 -0
- agent_recipes/templates/ai-test-generator/README.md +59 -0
- agent_recipes/templates/ai-test-generator/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-translation-batch/README.md +59 -0
- agent_recipes/templates/ai-translation-batch/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-url-to-markdown/README.md +14 -0
- agent_recipes/templates/ai-url-to-markdown/TEMPLATE.yaml +44 -0
- agent_recipes/templates/ai-video-chapter-generator/README.md +59 -0
- agent_recipes/templates/ai-video-chapter-generator/TEMPLATE.yaml +32 -0
- agent_recipes/templates/ai-video-compressor/README.md +59 -0
- agent_recipes/templates/ai-video-compressor/TEMPLATE.yaml +28 -0
- agent_recipes/templates/ai-video-editor/README.md +254 -0
- agent_recipes/templates/ai-video-editor/TEMPLATE.yaml +139 -0
- agent_recipes/templates/ai-video-editor/agents.yaml +36 -0
- agent_recipes/templates/ai-video-editor/requirements.txt +8 -0
- agent_recipes/templates/ai-video-editor/scripts/run.sh +10 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/__init__.py +45 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/__main__.py +8 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/__init__.cpython-312.pyc +0 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/cli.cpython-312.pyc +0 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/config.cpython-312.pyc +0 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/ffmpeg_probe.cpython-312.pyc +0 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/heuristics.cpython-312.pyc +0 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/llm_plan.cpython-312.pyc +0 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/models.cpython-312.pyc +0 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/pipeline.cpython-312.pyc +0 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/render.cpython-312.pyc +0 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/timeline.cpython-312.pyc +0 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/transcribe.cpython-312.pyc +0 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/utils.cpython-312.pyc +0 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/cli.py +343 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/config.py +102 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/ffmpeg_probe.py +92 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/heuristics.py +119 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/llm_plan.py +277 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/models.py +343 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/pipeline.py +287 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/render.py +274 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/timeline.py +278 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/transcribe.py +233 -0
- agent_recipes/templates/ai-video-editor/src/ai_video_editor/utils.py +222 -0
- agent_recipes/templates/ai-video-editor/src/input.mov +0 -0
- agent_recipes/templates/ai-video-editor/src/out.mp4 +0 -0
- agent_recipes/templates/ai-video-editor/tests/test_heuristics.py +130 -0
- agent_recipes/templates/ai-video-editor/tests/test_models.py +152 -0
- agent_recipes/templates/ai-video-editor/tests/test_timeline.py +105 -0
- agent_recipes/templates/ai-video-editor/workflow.yaml +51 -0
- agent_recipes/templates/ai-video-highlight-extractor/README.md +60 -0
- agent_recipes/templates/ai-video-highlight-extractor/TEMPLATE.yaml +33 -0
- agent_recipes/templates/ai-video-merger/recipe.yaml +40 -0
- agent_recipes/templates/ai-video-merger/tools.py +172 -0
- agent_recipes/templates/ai-video-thumbnails/README.md +16 -0
- agent_recipes/templates/ai-video-thumbnails/TEMPLATE.yaml +53 -0
- agent_recipes/templates/ai-video-to-gif/README.md +14 -0
- agent_recipes/templates/ai-video-to-gif/TEMPLATE.yaml +64 -0
- agent_recipes/templates/ai-voice-cloner/README.md +59 -0
- agent_recipes/templates/ai-voice-cloner/TEMPLATE.yaml +31 -0
- agent_recipes/templates/ai-voiceover-generator/recipe.yaml +41 -0
- agent_recipes/templates/ai-voiceover-generator/tools.py +194 -0
- agent_recipes/templates/ai-watermark-adder/README.md +59 -0
- agent_recipes/templates/ai-watermark-adder/TEMPLATE.yaml +26 -0
- agent_recipes/templates/ai-watermark-remover/README.md +60 -0
- agent_recipes/templates/ai-watermark-remover/TEMPLATE.yaml +32 -0
- agent_recipes/templates/data-transformer/README.md +75 -0
- agent_recipes/templates/data-transformer/TEMPLATE.yaml +63 -0
- agent_recipes/templates/data-transformer/agents.yaml +70 -0
- agent_recipes/templates/data-transformer/workflow.yaml +92 -0
- agent_recipes/templates/shorts-generator/README.md +61 -0
- agent_recipes/templates/shorts-generator/TEMPLATE.yaml +65 -0
- agent_recipes/templates/shorts-generator/agents.yaml +66 -0
- agent_recipes/templates/shorts-generator/workflow.yaml +86 -0
- agent_recipes/templates/transcript-generator/README.md +103 -0
- agent_recipes/templates/transcript-generator/TEMPLATE.yaml +57 -0
- agent_recipes/templates/transcript-generator/agents.yaml +62 -0
- agent_recipes/templates/transcript-generator/workflow.yaml +82 -0
- agent_recipes/templates/video-editor/README.md +70 -0
- agent_recipes/templates/video-editor/TEMPLATE.yaml +55 -0
- agent_recipes/templates/video-editor/agents.yaml +68 -0
- agent_recipes/templates/video-editor/workflow.yaml +92 -0
- agent_recipes-0.0.5.dist-info/METADATA +145 -0
- agent_recipes-0.0.5.dist-info/RECORD +269 -0
- agent_recipes-0.0.5.dist-info/WHEEL +5 -0
- agent_recipes-0.0.5.dist-info/top_level.txt +1 -0
- /236/326/177nE/243/231/214/232/265/322m/201/253/353/022C/372/321/266/b/225^=/272/017t/262/3337/310@/315wb/341pB/277z/216/330/314/004/265B/213/375/236/203/026/373/307/354z41/347#/374q/262/22589/032/276 /277/244Vh/322/017/004/224/215/004/367/377/375/335/n +0 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AI Hashtag Optimizer Tools
|
|
3
|
+
|
|
4
|
+
Optimize hashtags and keywords for social media reach.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import logging
|
|
8
|
+
import os
|
|
9
|
+
from typing import Any, Dict, List, Optional
|
|
10
|
+
|
|
11
|
+
logger = logging.getLogger(__name__)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def call_llm(prompt: str, max_tokens: int = 500) -> str:
|
|
15
|
+
"""Call OpenAI API."""
|
|
16
|
+
import requests
|
|
17
|
+
api_key = os.environ.get("OPENAI_API_KEY")
|
|
18
|
+
if not api_key:
|
|
19
|
+
raise ValueError("OPENAI_API_KEY not set")
|
|
20
|
+
response = requests.post(
|
|
21
|
+
"https://api.openai.com/v1/chat/completions",
|
|
22
|
+
headers={"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"},
|
|
23
|
+
json={"model": "gpt-4o-mini", "messages": [{"role": "user", "content": prompt}], "max_tokens": max_tokens},
|
|
24
|
+
timeout=60,
|
|
25
|
+
)
|
|
26
|
+
response.raise_for_status()
|
|
27
|
+
return response.json()["choices"][0]["message"]["content"]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def generate_hashtags(
|
|
31
|
+
topic: str,
|
|
32
|
+
platform: str = "instagram",
|
|
33
|
+
max_hashtags: int = 30,
|
|
34
|
+
mix_popularity: bool = True,
|
|
35
|
+
) -> Dict[str, Any]:
|
|
36
|
+
"""
|
|
37
|
+
Generate optimized hashtags for a topic.
|
|
38
|
+
|
|
39
|
+
Args:
|
|
40
|
+
topic: Content topic
|
|
41
|
+
platform: Target platform
|
|
42
|
+
max_hashtags: Maximum hashtags
|
|
43
|
+
mix_popularity: Mix popular and niche hashtags
|
|
44
|
+
|
|
45
|
+
Returns:
|
|
46
|
+
Dictionary with hashtags
|
|
47
|
+
"""
|
|
48
|
+
platform_limits = {
|
|
49
|
+
"instagram": 30,
|
|
50
|
+
"x": 5,
|
|
51
|
+
"linkedin": 5,
|
|
52
|
+
"tiktok": 10,
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
limit = min(max_hashtags, platform_limits.get(platform, 10))
|
|
56
|
+
|
|
57
|
+
prompt = f"""Generate {limit} optimized hashtags for this topic: {topic}
|
|
58
|
+
|
|
59
|
+
Platform: {platform}
|
|
60
|
+
{"Mix popular (high reach) and niche (high engagement) hashtags" if mix_popularity else "Focus on relevant hashtags"}
|
|
61
|
+
|
|
62
|
+
Requirements:
|
|
63
|
+
- No spaces in hashtags
|
|
64
|
+
- Relevant to the topic
|
|
65
|
+
- Mix of broad and specific tags
|
|
66
|
+
- Include trending tags if applicable
|
|
67
|
+
|
|
68
|
+
Format: One hashtag per line, starting with #"""
|
|
69
|
+
|
|
70
|
+
try:
|
|
71
|
+
result = call_llm(prompt, max_tokens=300)
|
|
72
|
+
|
|
73
|
+
hashtags = []
|
|
74
|
+
for line in result.split("\n"):
|
|
75
|
+
line = line.strip()
|
|
76
|
+
if line.startswith("#"):
|
|
77
|
+
tag = line.split()[0] # Get just the hashtag
|
|
78
|
+
hashtags.append(tag)
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
"hashtags": hashtags[:limit],
|
|
82
|
+
"platform": platform,
|
|
83
|
+
"count": len(hashtags[:limit]),
|
|
84
|
+
}
|
|
85
|
+
except Exception as e:
|
|
86
|
+
logger.error(f"Error generating hashtags: {e}")
|
|
87
|
+
return {"error": str(e)}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def optimize_keywords(
|
|
91
|
+
topic: str,
|
|
92
|
+
content_type: str = "video",
|
|
93
|
+
max_keywords: int = 20,
|
|
94
|
+
) -> Dict[str, Any]:
|
|
95
|
+
"""
|
|
96
|
+
Generate optimized keywords for SEO.
|
|
97
|
+
|
|
98
|
+
Args:
|
|
99
|
+
topic: Content topic
|
|
100
|
+
content_type: Type of content
|
|
101
|
+
max_keywords: Maximum keywords
|
|
102
|
+
|
|
103
|
+
Returns:
|
|
104
|
+
Dictionary with keywords
|
|
105
|
+
"""
|
|
106
|
+
prompt = f"""Generate {max_keywords} SEO keywords for this topic: {topic}
|
|
107
|
+
|
|
108
|
+
Content type: {content_type}
|
|
109
|
+
|
|
110
|
+
Include:
|
|
111
|
+
- Primary keywords (high search volume)
|
|
112
|
+
- Long-tail keywords (specific phrases)
|
|
113
|
+
- Related terms
|
|
114
|
+
- Question-based keywords
|
|
115
|
+
|
|
116
|
+
Format: One keyword/phrase per line"""
|
|
117
|
+
|
|
118
|
+
try:
|
|
119
|
+
result = call_llm(prompt, max_tokens=400)
|
|
120
|
+
|
|
121
|
+
keywords = []
|
|
122
|
+
for line in result.split("\n"):
|
|
123
|
+
line = line.strip().lstrip("-•").strip()
|
|
124
|
+
if line and len(line) > 2:
|
|
125
|
+
keywords.append(line)
|
|
126
|
+
|
|
127
|
+
return {
|
|
128
|
+
"keywords": keywords[:max_keywords],
|
|
129
|
+
"topic": topic,
|
|
130
|
+
"count": len(keywords[:max_keywords]),
|
|
131
|
+
}
|
|
132
|
+
except Exception as e:
|
|
133
|
+
logger.error(f"Error generating keywords: {e}")
|
|
134
|
+
return {"error": str(e)}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: ai-hook-generator
|
|
2
|
+
version: 1.0.0
|
|
3
|
+
description: Generate attention-grabbing hooks for the first 2 seconds of videos with multiple variants
|
|
4
|
+
author: PraisonAI
|
|
5
|
+
tags:
|
|
6
|
+
- hooks
|
|
7
|
+
- content
|
|
8
|
+
- video
|
|
9
|
+
- engagement
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
num_variants: 5
|
|
13
|
+
hook_styles:
|
|
14
|
+
- question
|
|
15
|
+
- bold_statement
|
|
16
|
+
- statistic
|
|
17
|
+
- story_tease
|
|
18
|
+
- controversy
|
|
19
|
+
max_length_seconds: 3
|
|
20
|
+
|
|
21
|
+
input:
|
|
22
|
+
type: object
|
|
23
|
+
properties:
|
|
24
|
+
topic:
|
|
25
|
+
type: string
|
|
26
|
+
num_variants:
|
|
27
|
+
type: integer
|
|
28
|
+
style:
|
|
29
|
+
type: string
|
|
30
|
+
|
|
31
|
+
output:
|
|
32
|
+
type: object
|
|
33
|
+
properties:
|
|
34
|
+
hooks:
|
|
35
|
+
type: array
|
|
36
|
+
best_hook:
|
|
37
|
+
type: string
|
|
38
|
+
|
|
39
|
+
requires:
|
|
40
|
+
env:
|
|
41
|
+
- OPENAI_API_KEY
|
|
42
|
+
|
|
43
|
+
workflow:
|
|
44
|
+
agents:
|
|
45
|
+
- name: hook_generator
|
|
46
|
+
role: Hook Specialist
|
|
47
|
+
goal: Create irresistible video hooks
|
|
48
|
+
tools:
|
|
49
|
+
- generate_hooks
|
|
50
|
+
- rank_hooks
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AI Hook Generator Tools
|
|
3
|
+
|
|
4
|
+
Generate multiple hook variants for video content:
|
|
5
|
+
- Question hooks
|
|
6
|
+
- Bold statement hooks
|
|
7
|
+
- Statistic hooks
|
|
8
|
+
- Story tease hooks
|
|
9
|
+
- Controversy hooks
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import logging
|
|
13
|
+
import os
|
|
14
|
+
from typing import Any, Dict, List, Optional
|
|
15
|
+
|
|
16
|
+
logger = logging.getLogger(__name__)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def call_llm(prompt: str, max_tokens: int = 800) -> str:
|
|
20
|
+
"""Call OpenAI API for text generation."""
|
|
21
|
+
import requests
|
|
22
|
+
|
|
23
|
+
api_key = os.environ.get("OPENAI_API_KEY")
|
|
24
|
+
if not api_key:
|
|
25
|
+
raise ValueError("OPENAI_API_KEY not set")
|
|
26
|
+
|
|
27
|
+
response = requests.post(
|
|
28
|
+
"https://api.openai.com/v1/chat/completions",
|
|
29
|
+
headers={
|
|
30
|
+
"Authorization": f"Bearer {api_key}",
|
|
31
|
+
"Content-Type": "application/json",
|
|
32
|
+
},
|
|
33
|
+
json={
|
|
34
|
+
"model": "gpt-4o-mini",
|
|
35
|
+
"messages": [{"role": "user", "content": prompt}],
|
|
36
|
+
"max_tokens": max_tokens,
|
|
37
|
+
"temperature": 0.9,
|
|
38
|
+
},
|
|
39
|
+
timeout=60,
|
|
40
|
+
)
|
|
41
|
+
response.raise_for_status()
|
|
42
|
+
return response.json()["choices"][0]["message"]["content"]
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def generate_hooks(
|
|
46
|
+
topic: str,
|
|
47
|
+
num_variants: int = 5,
|
|
48
|
+
styles: Optional[List[str]] = None,
|
|
49
|
+
max_words: int = 15,
|
|
50
|
+
) -> Dict[str, Any]:
|
|
51
|
+
"""
|
|
52
|
+
Generate multiple hook variants for a topic.
|
|
53
|
+
|
|
54
|
+
Args:
|
|
55
|
+
topic: The video topic
|
|
56
|
+
num_variants: Number of hook variants to generate
|
|
57
|
+
styles: Hook styles to use
|
|
58
|
+
max_words: Maximum words per hook
|
|
59
|
+
|
|
60
|
+
Returns:
|
|
61
|
+
Dictionary with hook variants
|
|
62
|
+
"""
|
|
63
|
+
styles = styles or ["question", "bold_statement", "statistic", "story_tease", "controversy"]
|
|
64
|
+
|
|
65
|
+
style_examples = {
|
|
66
|
+
"question": "Start with a provocative question",
|
|
67
|
+
"bold_statement": "Make a bold, attention-grabbing claim",
|
|
68
|
+
"statistic": "Lead with a surprising number or stat",
|
|
69
|
+
"story_tease": "Tease an interesting story or outcome",
|
|
70
|
+
"controversy": "Challenge a common belief",
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
styles_text = "\n".join(
|
|
74
|
+
f"- {s}: {style_examples.get(s, 'Unique approach')}"
|
|
75
|
+
for s in styles[:num_variants]
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
prompt = f"""Generate {num_variants} different video hooks for this topic: {topic}
|
|
79
|
+
|
|
80
|
+
Each hook must:
|
|
81
|
+
- Be under {max_words} words
|
|
82
|
+
- Grab attention in the first 2 seconds
|
|
83
|
+
- Make viewers want to keep watching
|
|
84
|
+
- Be speakable (sounds natural when said aloud)
|
|
85
|
+
|
|
86
|
+
Hook styles to use:
|
|
87
|
+
{styles_text}
|
|
88
|
+
|
|
89
|
+
Format each hook as:
|
|
90
|
+
[STYLE] Hook text here
|
|
91
|
+
|
|
92
|
+
Generate {num_variants} hooks:"""
|
|
93
|
+
|
|
94
|
+
result = call_llm(prompt, max_tokens=600)
|
|
95
|
+
|
|
96
|
+
# Parse hooks from response
|
|
97
|
+
hooks = []
|
|
98
|
+
for line in result.split("\n"):
|
|
99
|
+
line = line.strip()
|
|
100
|
+
if not line:
|
|
101
|
+
continue
|
|
102
|
+
|
|
103
|
+
# Try to extract style and hook
|
|
104
|
+
if "[" in line and "]" in line:
|
|
105
|
+
try:
|
|
106
|
+
style_end = line.index("]")
|
|
107
|
+
style = line[1:style_end].strip().lower()
|
|
108
|
+
hook_text = line[style_end + 1:].strip()
|
|
109
|
+
hooks.append({
|
|
110
|
+
"style": style,
|
|
111
|
+
"text": hook_text,
|
|
112
|
+
"word_count": len(hook_text.split()),
|
|
113
|
+
})
|
|
114
|
+
except Exception:
|
|
115
|
+
hooks.append({
|
|
116
|
+
"style": "unknown",
|
|
117
|
+
"text": line,
|
|
118
|
+
"word_count": len(line.split()),
|
|
119
|
+
})
|
|
120
|
+
elif line and not line.startswith("#"):
|
|
121
|
+
hooks.append({
|
|
122
|
+
"style": "unknown",
|
|
123
|
+
"text": line,
|
|
124
|
+
"word_count": len(line.split()),
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
return {
|
|
128
|
+
"hooks": hooks[:num_variants],
|
|
129
|
+
"topic": topic,
|
|
130
|
+
"total_generated": len(hooks),
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def rank_hooks(
|
|
135
|
+
hooks: List[Dict[str, Any]],
|
|
136
|
+
) -> Dict[str, Any]:
|
|
137
|
+
"""
|
|
138
|
+
Rank hooks by predicted engagement.
|
|
139
|
+
|
|
140
|
+
Args:
|
|
141
|
+
hooks: List of hook dictionaries
|
|
142
|
+
|
|
143
|
+
Returns:
|
|
144
|
+
Ranked hooks with scores
|
|
145
|
+
"""
|
|
146
|
+
ranked = []
|
|
147
|
+
|
|
148
|
+
for hook in hooks:
|
|
149
|
+
text = hook.get("text", "").lower()
|
|
150
|
+
score = 0.5
|
|
151
|
+
|
|
152
|
+
# Engagement indicators
|
|
153
|
+
if "?" in text:
|
|
154
|
+
score += 0.15 # Questions engage
|
|
155
|
+
if "you" in text:
|
|
156
|
+
score += 0.1 # Direct address
|
|
157
|
+
if any(word in text for word in ["secret", "truth", "actually", "never", "always"]):
|
|
158
|
+
score += 0.1 # Power words
|
|
159
|
+
if len(text.split()) <= 10:
|
|
160
|
+
score += 0.1 # Concise is better
|
|
161
|
+
|
|
162
|
+
# Penalize weak starts
|
|
163
|
+
weak_starts = ["so", "well", "um", "like", "basically"]
|
|
164
|
+
if any(text.startswith(w) for w in weak_starts):
|
|
165
|
+
score -= 0.1
|
|
166
|
+
|
|
167
|
+
ranked.append({
|
|
168
|
+
**hook,
|
|
169
|
+
"score": round(min(1.0, max(0.0, score)), 2),
|
|
170
|
+
})
|
|
171
|
+
|
|
172
|
+
ranked.sort(key=lambda x: x["score"], reverse=True)
|
|
173
|
+
|
|
174
|
+
return {
|
|
175
|
+
"ranked_hooks": ranked,
|
|
176
|
+
"best_hook": ranked[0] if ranked else None,
|
|
177
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Image Captioner
|
|
2
|
+
|
|
3
|
+
Generate alt-text/captions for images
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install agent-recipes
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## CLI Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Basic usage
|
|
15
|
+
praison recipes run ai-image-captioner <input>
|
|
16
|
+
|
|
17
|
+
# With output directory
|
|
18
|
+
praison recipes run ai-image-captioner <input> --output ./output/
|
|
19
|
+
|
|
20
|
+
# Dry run (check dependencies only)
|
|
21
|
+
praison recipes run ai-image-captioner <input> --dry-run
|
|
22
|
+
|
|
23
|
+
# Show recipe info
|
|
24
|
+
praison recipes info ai-image-captioner
|
|
25
|
+
|
|
26
|
+
# Check dependencies
|
|
27
|
+
praison recipes doctor ai-image-captioner
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Python Usage
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from praisonaiagents import Agent
|
|
34
|
+
from agent_recipes import load_recipe
|
|
35
|
+
|
|
36
|
+
# Load and run recipe
|
|
37
|
+
recipe = load_recipe("ai-image-captioner")
|
|
38
|
+
result = recipe.run(input="<your-input>")
|
|
39
|
+
print(result)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Requirements
|
|
43
|
+
|
|
44
|
+
### Packages
|
|
45
|
+
- openai
|
|
46
|
+
|
|
47
|
+
### Environment Variables
|
|
48
|
+
- OPENAI_API_KEY
|
|
49
|
+
|
|
50
|
+
### External Tools
|
|
51
|
+
- None
|
|
52
|
+
|
|
53
|
+
## Tags
|
|
54
|
+
|
|
55
|
+
`image`, `caption`, `accessibility`
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
Apache-2.0
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: ai-image-captioner
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Generate alt-text/captions for images
|
|
4
|
+
author: praison
|
|
5
|
+
license: Apache-2.0
|
|
6
|
+
tags:
|
|
7
|
+
- image
|
|
8
|
+
- caption
|
|
9
|
+
- accessibility
|
|
10
|
+
|
|
11
|
+
requires:
|
|
12
|
+
tools:
|
|
13
|
+
- vision_tool
|
|
14
|
+
packages:
|
|
15
|
+
- openai
|
|
16
|
+
env:
|
|
17
|
+
- OPENAI_API_KEY
|
|
18
|
+
|
|
19
|
+
cli:
|
|
20
|
+
command: praison recipes run ai-image-captioner
|
|
21
|
+
examples:
|
|
22
|
+
- praison recipes run ai-image-captioner <input>
|
|
23
|
+
- praison recipes run ai-image-captioner <input> --output ./output/
|
|
24
|
+
- praison recipes run ai-image-captioner <input> --dry-run
|
|
25
|
+
|
|
26
|
+
safety:
|
|
27
|
+
dry_run_default: false
|
|
28
|
+
overwrites_files: true
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# AI Image Cataloger
|
|
2
|
+
|
|
3
|
+
Catalog images with AI-generated captions and tags.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
```bash
|
|
7
|
+
praison run ai-image-cataloger ./photos/
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Output
|
|
11
|
+
- `catalog.json` - Image metadata with captions
|
|
12
|
+
- `contact-sheet.pdf` - Visual grid
|
|
13
|
+
- `thumbnails/` - Generated thumbnails
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: ai-image-cataloger
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Catalog images with AI-generated captions and tags.
|
|
4
|
+
author: praisonai
|
|
5
|
+
license: Apache-2.0
|
|
6
|
+
tags: [image, catalog, captions, tags, vision]
|
|
7
|
+
|
|
8
|
+
requires:
|
|
9
|
+
tools: [shell_tool]
|
|
10
|
+
packages: [praisonai-tools, Pillow]
|
|
11
|
+
env: [OPENAI_API_KEY]
|
|
12
|
+
|
|
13
|
+
config:
|
|
14
|
+
input:
|
|
15
|
+
type: string
|
|
16
|
+
required: true
|
|
17
|
+
output:
|
|
18
|
+
type: string
|
|
19
|
+
|
|
20
|
+
cli:
|
|
21
|
+
command: ai-image-cataloger
|
|
22
|
+
args:
|
|
23
|
+
- name: input
|
|
24
|
+
positional: true
|
|
25
|
+
required: true
|
|
26
|
+
- name: --output
|
|
27
|
+
short: -o
|
|
28
|
+
examples:
|
|
29
|
+
- "praison run ai-image-cataloger ./photos/"
|
|
30
|
+
|
|
31
|
+
outputs:
|
|
32
|
+
- name: catalog.json
|
|
33
|
+
type: file
|
|
34
|
+
- name: contact-sheet.pdf
|
|
35
|
+
type: file
|
|
36
|
+
- name: thumbnails/
|
|
37
|
+
type: directory
|
|
38
|
+
- name: run.json
|
|
39
|
+
type: file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# AI Image Optimizer
|
|
2
|
+
|
|
3
|
+
Optimize images for web with compression and format conversion.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
```bash
|
|
7
|
+
praison run ai-image-optimizer ./images/
|
|
8
|
+
praison run ai-image-optimizer photo.jpg --quality 80
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Output
|
|
12
|
+
- `optimized/` - Optimized images
|
|
13
|
+
- `size-report.json` - Size comparison report
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: ai-image-optimizer
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Optimize images for web with compression and format conversion.
|
|
4
|
+
author: praisonai
|
|
5
|
+
license: Apache-2.0
|
|
6
|
+
tags: [image, optimization, compression, web]
|
|
7
|
+
|
|
8
|
+
requires:
|
|
9
|
+
tools: [shell_tool]
|
|
10
|
+
packages: [praisonai-tools, Pillow]
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
input:
|
|
14
|
+
type: string
|
|
15
|
+
required: true
|
|
16
|
+
output:
|
|
17
|
+
type: string
|
|
18
|
+
quality:
|
|
19
|
+
type: integer
|
|
20
|
+
default: 85
|
|
21
|
+
max_width:
|
|
22
|
+
type: integer
|
|
23
|
+
|
|
24
|
+
cli:
|
|
25
|
+
command: ai-image-optimizer
|
|
26
|
+
args:
|
|
27
|
+
- name: input
|
|
28
|
+
positional: true
|
|
29
|
+
required: true
|
|
30
|
+
- name: --output
|
|
31
|
+
short: -o
|
|
32
|
+
- name: --quality
|
|
33
|
+
default: "85"
|
|
34
|
+
examples:
|
|
35
|
+
- "praison run ai-image-optimizer ./images/"
|
|
36
|
+
|
|
37
|
+
outputs:
|
|
38
|
+
- name: optimized/
|
|
39
|
+
type: directory
|
|
40
|
+
- name: size-report.json
|
|
41
|
+
type: file
|
|
42
|
+
- name: run.json
|
|
43
|
+
type: file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# AI Image Resizer
|
|
2
|
+
|
|
3
|
+
Batch resize images to multiple sizes for web/mobile.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
```bash
|
|
7
|
+
praison run ai-image-resizer ./images/
|
|
8
|
+
praison run ai-image-resizer ./images/ --sizes "1920,1280,640"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Output
|
|
12
|
+
- `resized/` - Resized images in subdirectories
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: ai-image-resizer
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Batch resize images to multiple sizes for web/mobile.
|
|
4
|
+
author: praisonai
|
|
5
|
+
license: Apache-2.0
|
|
6
|
+
tags: [image, resize, batch, responsive]
|
|
7
|
+
|
|
8
|
+
requires:
|
|
9
|
+
tools: [shell_tool]
|
|
10
|
+
packages: [praisonai-tools, Pillow]
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
input:
|
|
14
|
+
type: string
|
|
15
|
+
required: true
|
|
16
|
+
output:
|
|
17
|
+
type: string
|
|
18
|
+
sizes:
|
|
19
|
+
type: string
|
|
20
|
+
default: "1920,1280,640,320"
|
|
21
|
+
|
|
22
|
+
cli:
|
|
23
|
+
command: ai-image-resizer
|
|
24
|
+
args:
|
|
25
|
+
- name: input
|
|
26
|
+
positional: true
|
|
27
|
+
required: true
|
|
28
|
+
- name: --output
|
|
29
|
+
short: -o
|
|
30
|
+
- name: --sizes
|
|
31
|
+
default: "1920,1280,640,320"
|
|
32
|
+
examples:
|
|
33
|
+
- "praison run ai-image-resizer ./images/"
|
|
34
|
+
|
|
35
|
+
outputs:
|
|
36
|
+
- name: resized/
|
|
37
|
+
type: directory
|
|
38
|
+
- name: run.json
|
|
39
|
+
type: file
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Image Tagger
|
|
2
|
+
|
|
3
|
+
Auto-tag images with keywords/categories
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install agent-recipes
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## CLI Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Basic usage
|
|
15
|
+
praison recipes run ai-image-tagger <input>
|
|
16
|
+
|
|
17
|
+
# With output directory
|
|
18
|
+
praison recipes run ai-image-tagger <input> --output ./output/
|
|
19
|
+
|
|
20
|
+
# Dry run (check dependencies only)
|
|
21
|
+
praison recipes run ai-image-tagger <input> --dry-run
|
|
22
|
+
|
|
23
|
+
# Show recipe info
|
|
24
|
+
praison recipes info ai-image-tagger
|
|
25
|
+
|
|
26
|
+
# Check dependencies
|
|
27
|
+
praison recipes doctor ai-image-tagger
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Python Usage
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from praisonaiagents import Agent
|
|
34
|
+
from agent_recipes import load_recipe
|
|
35
|
+
|
|
36
|
+
# Load and run recipe
|
|
37
|
+
recipe = load_recipe("ai-image-tagger")
|
|
38
|
+
result = recipe.run(input="<your-input>")
|
|
39
|
+
print(result)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Requirements
|
|
43
|
+
|
|
44
|
+
### Packages
|
|
45
|
+
- openai
|
|
46
|
+
|
|
47
|
+
### Environment Variables
|
|
48
|
+
- OPENAI_API_KEY
|
|
49
|
+
|
|
50
|
+
### External Tools
|
|
51
|
+
- None
|
|
52
|
+
|
|
53
|
+
## Tags
|
|
54
|
+
|
|
55
|
+
`image`, `tagging`, `classification`
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
Apache-2.0
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: ai-image-tagger
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Auto-tag images with keywords/categories
|
|
4
|
+
author: praison
|
|
5
|
+
license: Apache-2.0
|
|
6
|
+
tags:
|
|
7
|
+
- image
|
|
8
|
+
- tagging
|
|
9
|
+
- classification
|
|
10
|
+
|
|
11
|
+
requires:
|
|
12
|
+
tools:
|
|
13
|
+
- vision_tool
|
|
14
|
+
packages:
|
|
15
|
+
- openai
|
|
16
|
+
env:
|
|
17
|
+
- OPENAI_API_KEY
|
|
18
|
+
|
|
19
|
+
cli:
|
|
20
|
+
command: praison recipes run ai-image-tagger
|
|
21
|
+
examples:
|
|
22
|
+
- praison recipes run ai-image-tagger <input>
|
|
23
|
+
- praison recipes run ai-image-tagger <input> --output ./output/
|
|
24
|
+
- praison recipes run ai-image-tagger <input> --dry-run
|
|
25
|
+
|
|
26
|
+
safety:
|
|
27
|
+
dry_run_default: false
|
|
28
|
+
overwrites_files: true
|