INNER CODE UNIT · Python

handle

usepr/eva · showcase/wechat-bot/bot.py:40

async def handle(msg):
    await bot.send_typing(msg.user_id)
    text = msg.text.strip()
    if text.lower() in ['/clear', 'clear']:
        args = ["eva", "-c"]
    else:
        args = ["eva", "-asu", text]
    await bot.reply(msg, clean_eva_output(run_cli(args)))

bot.run()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…