From ce51a20bdbbf98296943b6b3c42cd6268e07d9fc Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 21 Jun 2026 13:43:36 +0800 Subject: [PATCH] refactor: convert _stream_agent_tokens to a static method --- app/agent/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/agent/__init__.py b/app/agent/__init__.py index 19a78a1c..76a5e4cf 100644 --- a/app/agent/__init__.py +++ b/app/agent/__init__.py @@ -1177,8 +1177,9 @@ class MoviePilotAgent: ) return attachments + @staticmethod async def _stream_agent_tokens( - self, agent, messages: dict, config: dict, on_token: Callable[[str], None] + agent, messages: dict, config: dict, on_token: Callable[[str], None] ): """ 流式运行智能体,过滤工具调用token和思考内容,将模型生成的内容通过回调输出。