Skip to content

Commit 576a709

Browse files
committed
修复一些代码错误
1 parent e89e5e6 commit 576a709

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

astrbot/core/astr_main_agent.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,6 @@ def _proactive_cron_job_tools(req: ProviderRequest) -> None:
816816
def _get_compress_provider(
817817
config: MainAgentBuildConfig,
818818
plugin_context: Context,
819-
active_provider: Provider | None,
820819
) -> Provider | None:
821820
if config.context_limit_reached_strategy != "llm_compress":
822821
return None
@@ -984,7 +983,7 @@ async def build_main_agent(
984983
streaming=config.streaming_response,
985984
llm_compress_instruction=config.llm_compress_instruction,
986985
llm_compress_keep_recent=config.llm_compress_keep_recent,
987-
llm_compress_provider=_get_compress_provider(config, plugin_context, provider),
986+
llm_compress_provider=_get_compress_provider(config, plugin_context),
988987
llm_compress_use_compact_api=config.llm_compress_use_compact_api,
989988
truncate_turns=config.dequeue_context_length,
990989
enforce_max_turns=config.max_context_length,

astrbot/dashboard/routes/chat.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,6 @@ async def stream():
383383
except asyncio.CancelledError:
384384
logger.debug(f"[WebChat] 用户 {username} 断开聊天长连接。")
385385
client_disconnected = True
386-
break
387386
except Exception as e:
388387
logger.error(f"WebChat stream error: {e}")
389388
continue

0 commit comments

Comments
 (0)