INNER CODE UNIT · Python
out
usepr/eva · showcase/wechat-bot/bot.py:28
out = out[out.rindex(eva_s)+len(eva_s):]
session_s = "> 会话已保存到:"
if session_s in out:
out = out[:out.rindex(session_s)]
return out.strip().replace('\033[2m', '').replace('\033[0m', '\n\n___\n')
bot = WeChatBot()
@bot.on_message
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: