Skip to content

Commit 28b1772

Browse files
committed
fix(pipeline): skip empty message LLM request even with provider_request
1 parent c2e8d2f commit 28b1772

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,18 +150,13 @@ async def process(
150150
if (enable_streaming := event.get_extra("enable_streaming")) is not None:
151151
streaming_response = bool(enable_streaming)
152152

153-
has_provider_request = event.get_extra("provider_request") is not None
154153
has_valid_message = bool(event.message_str and event.message_str.strip())
155154
has_media_content = any(
156155
isinstance(comp, Image | File) for comp in event.message_obj.message
157156
)
158157

159-
if (
160-
not has_provider_request
161-
and not has_valid_message
162-
and not has_media_content
163-
):
164-
logger.debug("skip llm request: empty message and no provider_request")
158+
if not has_valid_message and not has_media_content:
159+
logger.debug("skip llm request: empty message")
165160
return
166161

167162
logger.debug("ready to request llm provider")

astrbot/core/pipeline/waking_check/stage.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,6 @@ async def process(
143143
event.is_at_or_wake_command = True
144144
wake_prefix = ""
145145

146-
if is_wake and not event.message_str and not messages:
147-
event.stop_event()
148-
return
149-
150146
# 检查插件的 handler filter
151147
activated_handlers = []
152148
handlers_parsed_params = {} # 注册了指令的 handler

0 commit comments

Comments
 (0)