feat: Ghost EN — /generate blog en publica en inglés en theexclusionzone.com
Build & Deploy ResearchOwl / build-and-push (push) Successful in 1m19s

This commit is contained in:
ChemaVX
2026-05-18 16:49:09 +00:00
parent 747b9605c0
commit f577ac4712
3 changed files with 69 additions and 13 deletions
+6 -3
View File
@@ -277,6 +277,7 @@ async def cmd_generate(update: Update, ctx: ContextTypes.DEFAULT_TYPE):
chat_id = update.effective_chat.id
output_arg = ctx.args[0].lower() if ctx.args else ""
lang = "en" if len(ctx.args) > 1 and ctx.args[1].lower() == "en" else "es"
type_map = {
"podcast": OutputType.PODCAST,
@@ -326,9 +327,11 @@ async def cmd_generate(update: Update, ctx: ContextTypes.DEFAULT_TYPE):
session = dict(row)
session_id = session["id"]
backend = "Claude Haiku" if settings.anthropic_api_key else f"Ollama ({settings.ollama_model})"
lang_label = " (EN)" if lang == "en" else ""
msg = await update.message.reply_text(
f"⚙️ Generating *{output_type}* for: `{session['topic']}`\n"
f"Using Ollama ({settings.ollama_model})...\n"
f"⚙️ Generating *{output_type}{lang_label}* for: `{session['topic']}`\n"
f"Using {backend}...\n"
f"This may take 2-5 minutes ☕",
parse_mode=ParseMode.MARKDOWN
)
@@ -343,7 +346,7 @@ async def cmd_generate(update: Update, ctx: ContextTypes.DEFAULT_TYPE):
processor = ContentProcessor(db, ollama)
generator = OutputGenerator(db, ollama, processor)
output = await generator.generate(session_id, output_type, gen_progress)
output = await generator.generate(session_id, output_type, gen_progress, lang=lang)
# Send as file if very long
if len(output) > 8000: