This commit is contained in:
xds
2026-02-03 09:40:43 +03:00
parent ea3f50db50
commit 2693675e85

View File

@@ -375,14 +375,12 @@ async def handle_text(message: Message, gemini: GoogleAdapter, state: FSMContext
async def gen_start_text(message: Message, gemini: GoogleAdapter, state: FSMContext, dao: DAO, bot: Bot,
char_id: str = None) -> str:
await bot.send_chat_action(message.chat.id, "typing")
prompt = ("Use a TELEGRAM HTML formatting. If you write a prompt use <pre> tag.\n\n"
"PROMPT:\n\n",
message.text,
'\n\n')
prompt = "Use a TELEGRAM HTML formatting. If you write a prompt use <pre> tag.\n\n"
prompt+=f"PROMPT:\n{message.text}\n\n"
if char_id:
char = await dao.chars.get_character(message.chat.id)
prompt += char.character_bio
result = await asyncio.to_thread(gemini.generate_text, prompt=message.text)
result = await asyncio.to_thread(gemini.generate_text, prompt=prompt)
if result:
return result
else: