mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-28 19:47:41 +08:00
Refactor: Allow messages without /ai prefix
Co-authored-by: jxxghp <jxxghp@qq.com>
This commit is contained in:
+4
-11
@@ -943,17 +943,10 @@ class MessageChain(ChainBase):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# 提取用户消息
|
# 提取用户消息
|
||||||
if not text.startswith("/ai"):
|
if text.startswith("/ai"):
|
||||||
self.post_message(Notification(
|
user_message = text[3:].strip() # 移除 "/ai" 前缀
|
||||||
channel=channel,
|
else:
|
||||||
source=source,
|
user_message = text.strip() # 按原消息处理
|
||||||
userid=userid,
|
|
||||||
username=username,
|
|
||||||
title="消息格式错误,请以 /ai 开头"
|
|
||||||
))
|
|
||||||
return
|
|
||||||
|
|
||||||
user_message = text[3:].strip() # 移除 "/ai" 前缀
|
|
||||||
if not user_message:
|
if not user_message:
|
||||||
self.post_message(Notification(
|
self.post_message(Notification(
|
||||||
channel=channel,
|
channel=channel,
|
||||||
|
|||||||
Reference in New Issue
Block a user