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,105 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AI Post Copy Generator Tools
|
|
3
|
+
|
|
4
|
+
Generate platform-specific copy for social media posts.
|
|
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_post_copy(
|
|
31
|
+
topic: str,
|
|
32
|
+
platform: str = "x",
|
|
33
|
+
tone: str = "professional",
|
|
34
|
+
include_hashtags: bool = True,
|
|
35
|
+
include_cta: bool = True,
|
|
36
|
+
) -> Dict[str, Any]:
|
|
37
|
+
"""
|
|
38
|
+
Generate platform-specific post copy.
|
|
39
|
+
|
|
40
|
+
Args:
|
|
41
|
+
topic: Post topic
|
|
42
|
+
platform: Target platform
|
|
43
|
+
tone: Writing tone
|
|
44
|
+
include_hashtags: Include hashtags
|
|
45
|
+
include_cta: Include call to action
|
|
46
|
+
|
|
47
|
+
Returns:
|
|
48
|
+
Dictionary with generated copy
|
|
49
|
+
"""
|
|
50
|
+
platform_limits = {
|
|
51
|
+
"x": 280,
|
|
52
|
+
"linkedin": 3000,
|
|
53
|
+
"youtube": 5000,
|
|
54
|
+
"instagram": 2200,
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
max_length = platform_limits.get(platform, 500)
|
|
58
|
+
|
|
59
|
+
prompt = f"""Write a {platform} post about: {topic}
|
|
60
|
+
|
|
61
|
+
Requirements:
|
|
62
|
+
- Tone: {tone}
|
|
63
|
+
- Max length: {max_length} characters
|
|
64
|
+
- Platform: {platform}
|
|
65
|
+
{"- Include 3-5 relevant hashtags" if include_hashtags else ""}
|
|
66
|
+
{"- End with a call to action" if include_cta else ""}
|
|
67
|
+
|
|
68
|
+
Write engaging copy optimized for {platform}:"""
|
|
69
|
+
|
|
70
|
+
try:
|
|
71
|
+
copy = call_llm(prompt, max_tokens=400)
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
"copy": copy.strip(),
|
|
75
|
+
"platform": platform,
|
|
76
|
+
"length": len(copy),
|
|
77
|
+
"within_limit": len(copy) <= max_length,
|
|
78
|
+
}
|
|
79
|
+
except Exception as e:
|
|
80
|
+
logger.error(f"Error generating copy: {e}")
|
|
81
|
+
return {"error": str(e)}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def generate_multi_platform_copy(
|
|
85
|
+
topic: str,
|
|
86
|
+
platforms: Optional[List[str]] = None,
|
|
87
|
+
) -> Dict[str, Any]:
|
|
88
|
+
"""
|
|
89
|
+
Generate copy for multiple platforms.
|
|
90
|
+
|
|
91
|
+
Args:
|
|
92
|
+
topic: Post topic
|
|
93
|
+
platforms: Target platforms
|
|
94
|
+
|
|
95
|
+
Returns:
|
|
96
|
+
Dictionary with copy for each platform
|
|
97
|
+
"""
|
|
98
|
+
platforms = platforms or ["x", "linkedin", "youtube"]
|
|
99
|
+
copies = {}
|
|
100
|
+
|
|
101
|
+
for platform in platforms:
|
|
102
|
+
result = generate_post_copy(topic, platform)
|
|
103
|
+
copies[platform] = result
|
|
104
|
+
|
|
105
|
+
return {"copies": copies, "topic": topic}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Product Description Generator
|
|
2
|
+
|
|
3
|
+
Generate e-commerce product descriptions
|
|
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-product-description-generator <input>
|
|
16
|
+
|
|
17
|
+
# With output directory
|
|
18
|
+
praison recipes run ai-product-description-generator <input> --output ./output/
|
|
19
|
+
|
|
20
|
+
# Dry run (check dependencies only)
|
|
21
|
+
praison recipes run ai-product-description-generator <input> --dry-run
|
|
22
|
+
|
|
23
|
+
# Show recipe info
|
|
24
|
+
praison recipes info ai-product-description-generator
|
|
25
|
+
|
|
26
|
+
# Check dependencies
|
|
27
|
+
praison recipes doctor ai-product-description-generator
|
|
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-product-description-generator")
|
|
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
|
+
`web`, `ecommerce`, `product`
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
Apache-2.0
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: ai-product-description-generator
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Generate e-commerce product descriptions
|
|
4
|
+
author: praison
|
|
5
|
+
license: Apache-2.0
|
|
6
|
+
tags:
|
|
7
|
+
- web
|
|
8
|
+
- ecommerce
|
|
9
|
+
- product
|
|
10
|
+
|
|
11
|
+
requires:
|
|
12
|
+
tools:
|
|
13
|
+
- llm_tool
|
|
14
|
+
packages:
|
|
15
|
+
- openai
|
|
16
|
+
env:
|
|
17
|
+
- OPENAI_API_KEY
|
|
18
|
+
|
|
19
|
+
cli:
|
|
20
|
+
command: praison recipes run ai-product-description-generator
|
|
21
|
+
examples:
|
|
22
|
+
- praison recipes run ai-product-description-generator <input>
|
|
23
|
+
- praison recipes run ai-product-description-generator <input> --output ./output/
|
|
24
|
+
- praison recipes run ai-product-description-generator <input> --dry-run
|
|
25
|
+
|
|
26
|
+
safety:
|
|
27
|
+
dry_run_default: false
|
|
28
|
+
overwrites_files: true
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: ai-publisher-pack
|
|
2
|
+
version: 1.0.0
|
|
3
|
+
description: Generate cross-platform publisher packs with ready-to-upload files and metadata
|
|
4
|
+
author: PraisonAI
|
|
5
|
+
tags:
|
|
6
|
+
- publishing
|
|
7
|
+
- distribution
|
|
8
|
+
- multi-platform
|
|
9
|
+
|
|
10
|
+
config:
|
|
11
|
+
platforms:
|
|
12
|
+
- youtube
|
|
13
|
+
- x
|
|
14
|
+
- linkedin
|
|
15
|
+
- instagram
|
|
16
|
+
- tiktok
|
|
17
|
+
include_metadata: true
|
|
18
|
+
include_thumbnails: true
|
|
19
|
+
|
|
20
|
+
input:
|
|
21
|
+
type: object
|
|
22
|
+
properties:
|
|
23
|
+
content:
|
|
24
|
+
type: object
|
|
25
|
+
platforms:
|
|
26
|
+
type: array
|
|
27
|
+
|
|
28
|
+
output:
|
|
29
|
+
type: object
|
|
30
|
+
properties:
|
|
31
|
+
packs:
|
|
32
|
+
type: array
|
|
33
|
+
|
|
34
|
+
requires:
|
|
35
|
+
env:
|
|
36
|
+
- OPENAI_API_KEY
|
|
37
|
+
|
|
38
|
+
workflow:
|
|
39
|
+
agents:
|
|
40
|
+
- name: publisher
|
|
41
|
+
role: Content Publisher
|
|
42
|
+
tools:
|
|
43
|
+
- create_publisher_pack
|
|
44
|
+
- generate_platform_assets
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AI Publisher Pack Tools
|
|
3
|
+
|
|
4
|
+
Create cross-platform publishing packs:
|
|
5
|
+
- Platform-specific metadata
|
|
6
|
+
- Optimized assets
|
|
7
|
+
- Ready-to-upload bundles
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import json
|
|
11
|
+
import logging
|
|
12
|
+
import os
|
|
13
|
+
from datetime import datetime, timezone
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
from typing import Any, Dict, List, Optional
|
|
16
|
+
|
|
17
|
+
logger = logging.getLogger(__name__)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def create_publisher_pack(
|
|
21
|
+
content: Dict[str, Any],
|
|
22
|
+
platforms: Optional[List[str]] = None,
|
|
23
|
+
output_dir: Optional[str] = None,
|
|
24
|
+
) -> Dict[str, Any]:
|
|
25
|
+
"""
|
|
26
|
+
Create a publisher pack for multiple platforms.
|
|
27
|
+
|
|
28
|
+
Args:
|
|
29
|
+
content: Content dictionary with title, description, video, etc.
|
|
30
|
+
platforms: Target platforms
|
|
31
|
+
output_dir: Output directory
|
|
32
|
+
|
|
33
|
+
Returns:
|
|
34
|
+
Dictionary with pack info
|
|
35
|
+
"""
|
|
36
|
+
platforms = platforms or ["youtube", "x", "linkedin"]
|
|
37
|
+
output_dir = output_dir or "./publisher_packs"
|
|
38
|
+
|
|
39
|
+
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
|
40
|
+
pack_dir = os.path.join(output_dir, f"pack_{timestamp}")
|
|
41
|
+
Path(pack_dir).mkdir(parents=True, exist_ok=True)
|
|
42
|
+
|
|
43
|
+
packs = []
|
|
44
|
+
|
|
45
|
+
for platform in platforms:
|
|
46
|
+
platform_dir = os.path.join(pack_dir, platform)
|
|
47
|
+
Path(platform_dir).mkdir(parents=True, exist_ok=True)
|
|
48
|
+
|
|
49
|
+
# Generate platform-specific metadata
|
|
50
|
+
metadata = generate_platform_metadata(content, platform)
|
|
51
|
+
|
|
52
|
+
# Save metadata
|
|
53
|
+
metadata_path = os.path.join(platform_dir, "metadata.json")
|
|
54
|
+
with open(metadata_path, "w") as f:
|
|
55
|
+
json.dump(metadata, f, indent=2)
|
|
56
|
+
|
|
57
|
+
# Create upload instructions
|
|
58
|
+
instructions = generate_upload_instructions(platform, metadata)
|
|
59
|
+
instructions_path = os.path.join(platform_dir, "UPLOAD_INSTRUCTIONS.md")
|
|
60
|
+
with open(instructions_path, "w") as f:
|
|
61
|
+
f.write(instructions)
|
|
62
|
+
|
|
63
|
+
packs.append({
|
|
64
|
+
"platform": platform,
|
|
65
|
+
"directory": platform_dir,
|
|
66
|
+
"metadata": metadata,
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
# Create master manifest
|
|
70
|
+
manifest = {
|
|
71
|
+
"created_at": datetime.now(timezone.utc).isoformat(),
|
|
72
|
+
"platforms": platforms,
|
|
73
|
+
"packs": [{
|
|
74
|
+
"platform": p["platform"],
|
|
75
|
+
"directory": p["directory"],
|
|
76
|
+
} for p in packs],
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
manifest_path = os.path.join(pack_dir, "manifest.json")
|
|
80
|
+
with open(manifest_path, "w") as f:
|
|
81
|
+
json.dump(manifest, f, indent=2)
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
"pack_dir": pack_dir,
|
|
85
|
+
"packs": packs,
|
|
86
|
+
"manifest": manifest_path,
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def generate_platform_metadata(
|
|
91
|
+
content: Dict[str, Any],
|
|
92
|
+
platform: str,
|
|
93
|
+
) -> Dict[str, Any]:
|
|
94
|
+
"""
|
|
95
|
+
Generate platform-specific metadata.
|
|
96
|
+
|
|
97
|
+
Args:
|
|
98
|
+
content: Source content
|
|
99
|
+
platform: Target platform
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
Platform-specific metadata
|
|
103
|
+
"""
|
|
104
|
+
title = content.get("title", "Untitled")
|
|
105
|
+
description = content.get("description", "")
|
|
106
|
+
tags = content.get("tags", [])
|
|
107
|
+
|
|
108
|
+
platform_configs = {
|
|
109
|
+
"youtube": {
|
|
110
|
+
"title": title[:100],
|
|
111
|
+
"description": description[:5000],
|
|
112
|
+
"tags": tags[:500],
|
|
113
|
+
"category": content.get("category", "22"), # People & Blogs
|
|
114
|
+
"privacy": "public",
|
|
115
|
+
"made_for_kids": False,
|
|
116
|
+
},
|
|
117
|
+
"x": {
|
|
118
|
+
"text": f"{title}\n\n{description[:200]}",
|
|
119
|
+
"hashtags": [f"#{t}" for t in tags[:5]],
|
|
120
|
+
"max_length": 280,
|
|
121
|
+
},
|
|
122
|
+
"linkedin": {
|
|
123
|
+
"title": title[:200],
|
|
124
|
+
"text": description[:3000],
|
|
125
|
+
"hashtags": [f"#{t}" for t in tags[:5]],
|
|
126
|
+
},
|
|
127
|
+
"instagram": {
|
|
128
|
+
"caption": f"{title}\n\n{description[:2000]}",
|
|
129
|
+
"hashtags": [f"#{t}" for t in tags[:30]],
|
|
130
|
+
},
|
|
131
|
+
"tiktok": {
|
|
132
|
+
"caption": f"{title} {' '.join([f'#{t}' for t in tags[:5]])}",
|
|
133
|
+
"max_length": 150,
|
|
134
|
+
},
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return platform_configs.get(platform, {"title": title, "description": description})
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def generate_upload_instructions(
|
|
141
|
+
platform: str,
|
|
142
|
+
metadata: Dict[str, Any],
|
|
143
|
+
) -> str:
|
|
144
|
+
"""
|
|
145
|
+
Generate upload instructions for a platform.
|
|
146
|
+
|
|
147
|
+
Args:
|
|
148
|
+
platform: Target platform
|
|
149
|
+
metadata: Platform metadata
|
|
150
|
+
|
|
151
|
+
Returns:
|
|
152
|
+
Markdown instructions
|
|
153
|
+
"""
|
|
154
|
+
instructions = {
|
|
155
|
+
"youtube": f"""# YouTube Upload Instructions
|
|
156
|
+
|
|
157
|
+
1. Go to YouTube Studio: https://studio.youtube.com
|
|
158
|
+
2. Click "Create" > "Upload videos"
|
|
159
|
+
3. Select your video file
|
|
160
|
+
4. Fill in the following:
|
|
161
|
+
|
|
162
|
+
**Title:** {metadata.get('title', '')}
|
|
163
|
+
|
|
164
|
+
**Description:**
|
|
165
|
+
{metadata.get('description', '')}
|
|
166
|
+
|
|
167
|
+
**Tags:** {', '.join(metadata.get('tags', [])[:10])}
|
|
168
|
+
|
|
169
|
+
5. Set visibility to: {metadata.get('privacy', 'public')}
|
|
170
|
+
6. Click "Publish"
|
|
171
|
+
""",
|
|
172
|
+
"x": f"""# X (Twitter) Post Instructions
|
|
173
|
+
|
|
174
|
+
1. Go to X: https://x.com/compose/tweet
|
|
175
|
+
2. Paste the following text:
|
|
176
|
+
|
|
177
|
+
{metadata.get('text', '')}
|
|
178
|
+
|
|
179
|
+
3. Attach your media file
|
|
180
|
+
4. Click "Post"
|
|
181
|
+
""",
|
|
182
|
+
"linkedin": f"""# LinkedIn Post Instructions
|
|
183
|
+
|
|
184
|
+
1. Go to LinkedIn: https://www.linkedin.com/feed/
|
|
185
|
+
2. Click "Start a post"
|
|
186
|
+
3. Paste the following:
|
|
187
|
+
|
|
188
|
+
{metadata.get('title', '')}
|
|
189
|
+
|
|
190
|
+
{metadata.get('text', '')}
|
|
191
|
+
|
|
192
|
+
{' '.join(metadata.get('hashtags', []))}
|
|
193
|
+
|
|
194
|
+
4. Add your media
|
|
195
|
+
5. Click "Post"
|
|
196
|
+
""",
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return instructions.get(platform, f"# {platform.title()} Upload\n\nUpload your content to {platform}.")
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
def generate_platform_assets(
|
|
203
|
+
video_path: str,
|
|
204
|
+
platforms: List[str],
|
|
205
|
+
output_dir: str,
|
|
206
|
+
) -> Dict[str, Any]:
|
|
207
|
+
"""
|
|
208
|
+
Generate platform-optimized video assets.
|
|
209
|
+
|
|
210
|
+
Args:
|
|
211
|
+
video_path: Source video path
|
|
212
|
+
platforms: Target platforms
|
|
213
|
+
output_dir: Output directory
|
|
214
|
+
|
|
215
|
+
Returns:
|
|
216
|
+
Dictionary with generated assets
|
|
217
|
+
"""
|
|
218
|
+
import subprocess
|
|
219
|
+
|
|
220
|
+
assets = []
|
|
221
|
+
|
|
222
|
+
platform_specs = {
|
|
223
|
+
"youtube": {"resolution": "1920x1080", "aspect": "16:9"},
|
|
224
|
+
"instagram": {"resolution": "1080x1080", "aspect": "1:1"},
|
|
225
|
+
"tiktok": {"resolution": "1080x1920", "aspect": "9:16"},
|
|
226
|
+
"x": {"resolution": "1280x720", "aspect": "16:9"},
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
for platform in platforms:
|
|
230
|
+
spec = platform_specs.get(platform, platform_specs["youtube"])
|
|
231
|
+
output_path = os.path.join(output_dir, f"{platform}_video.mp4")
|
|
232
|
+
|
|
233
|
+
try:
|
|
234
|
+
cmd = [
|
|
235
|
+
"ffmpeg", "-y",
|
|
236
|
+
"-i", video_path,
|
|
237
|
+
"-vf", f"scale={spec['resolution'].replace('x', ':')}:force_original_aspect_ratio=decrease,pad={spec['resolution'].replace('x', ':')}:(ow-iw)/2:(oh-ih)/2",
|
|
238
|
+
"-c:v", "libx264",
|
|
239
|
+
"-c:a", "aac",
|
|
240
|
+
output_path
|
|
241
|
+
]
|
|
242
|
+
subprocess.run(cmd, capture_output=True, check=True)
|
|
243
|
+
|
|
244
|
+
assets.append({
|
|
245
|
+
"platform": platform,
|
|
246
|
+
"path": output_path,
|
|
247
|
+
"spec": spec,
|
|
248
|
+
})
|
|
249
|
+
except Exception as e:
|
|
250
|
+
logger.warning(f"Error creating {platform} asset: {e}")
|
|
251
|
+
|
|
252
|
+
return {"assets": assets}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Qr Code Generator
|
|
2
|
+
|
|
3
|
+
Generate QR codes from data
|
|
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-qr-code-generator <input>
|
|
16
|
+
|
|
17
|
+
# With output directory
|
|
18
|
+
praison recipes run ai-qr-code-generator <input> --output ./output/
|
|
19
|
+
|
|
20
|
+
# Dry run (check dependencies only)
|
|
21
|
+
praison recipes run ai-qr-code-generator <input> --dry-run
|
|
22
|
+
|
|
23
|
+
# Show recipe info
|
|
24
|
+
praison recipes info ai-qr-code-generator
|
|
25
|
+
|
|
26
|
+
# Check dependencies
|
|
27
|
+
praison recipes doctor ai-qr-code-generator
|
|
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-qr-code-generator")
|
|
38
|
+
result = recipe.run(input="<your-input>")
|
|
39
|
+
print(result)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Requirements
|
|
43
|
+
|
|
44
|
+
### Packages
|
|
45
|
+
- qrcode
|
|
46
|
+
- pillow
|
|
47
|
+
|
|
48
|
+
### Environment Variables
|
|
49
|
+
- None
|
|
50
|
+
|
|
51
|
+
### External Tools
|
|
52
|
+
- None
|
|
53
|
+
|
|
54
|
+
## Tags
|
|
55
|
+
|
|
56
|
+
`productivity`, `qr-code`, `generation`
|
|
57
|
+
|
|
58
|
+
## License
|
|
59
|
+
|
|
60
|
+
Apache-2.0
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: ai-qr-code-generator
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Generate QR codes from data
|
|
4
|
+
author: praison
|
|
5
|
+
license: Apache-2.0
|
|
6
|
+
tags:
|
|
7
|
+
- productivity
|
|
8
|
+
- qr-code
|
|
9
|
+
- generation
|
|
10
|
+
|
|
11
|
+
requires:
|
|
12
|
+
tools:
|
|
13
|
+
packages:
|
|
14
|
+
- qrcode
|
|
15
|
+
- pillow
|
|
16
|
+
|
|
17
|
+
cli:
|
|
18
|
+
command: praison recipes run ai-qr-code-generator
|
|
19
|
+
examples:
|
|
20
|
+
- praison recipes run ai-qr-code-generator <input>
|
|
21
|
+
- praison recipes run ai-qr-code-generator <input> --output ./output/
|
|
22
|
+
- praison recipes run ai-qr-code-generator <input> --dry-run
|
|
23
|
+
|
|
24
|
+
safety:
|
|
25
|
+
dry_run_default: false
|
|
26
|
+
overwrites_files: true
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Regex Generator
|
|
2
|
+
|
|
3
|
+
Generate regex patterns from descriptions
|
|
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-regex-generator <input>
|
|
16
|
+
|
|
17
|
+
# With output directory
|
|
18
|
+
praison recipes run ai-regex-generator <input> --output ./output/
|
|
19
|
+
|
|
20
|
+
# Dry run (check dependencies only)
|
|
21
|
+
praison recipes run ai-regex-generator <input> --dry-run
|
|
22
|
+
|
|
23
|
+
# Show recipe info
|
|
24
|
+
praison recipes info ai-regex-generator
|
|
25
|
+
|
|
26
|
+
# Check dependencies
|
|
27
|
+
praison recipes doctor ai-regex-generator
|
|
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-regex-generator")
|
|
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
|
+
`code`, `regex`, `patterns`
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
Apache-2.0
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: ai-regex-generator
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Generate regex patterns from descriptions
|
|
4
|
+
author: praison
|
|
5
|
+
license: Apache-2.0
|
|
6
|
+
tags:
|
|
7
|
+
- code
|
|
8
|
+
- regex
|
|
9
|
+
- patterns
|
|
10
|
+
|
|
11
|
+
requires:
|
|
12
|
+
tools:
|
|
13
|
+
- llm_tool
|
|
14
|
+
packages:
|
|
15
|
+
- openai
|
|
16
|
+
env:
|
|
17
|
+
- OPENAI_API_KEY
|
|
18
|
+
|
|
19
|
+
cli:
|
|
20
|
+
command: praison recipes run ai-regex-generator
|
|
21
|
+
examples:
|
|
22
|
+
- praison recipes run ai-regex-generator <input>
|
|
23
|
+
- praison recipes run ai-regex-generator <input> --output ./output/
|
|
24
|
+
- praison recipes run ai-regex-generator <input> --dry-run
|
|
25
|
+
|
|
26
|
+
safety:
|
|
27
|
+
dry_run_default: false
|
|
28
|
+
overwrites_files: true
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# AI Repo README
|
|
2
|
+
|
|
3
|
+
Generate or update README.md for a git repository.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
```bash
|
|
7
|
+
praison run ai-repo-readme ./my-project
|
|
8
|
+
praison run ai-repo-readme ./my-project --update
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Output
|
|
12
|
+
- `README.md` - Generated/updated README
|
|
13
|
+
- `structure.json` - Repository structure analysis
|