Yuxi-Know icon indicating copy to clipboard operation
Yuxi-Know copied to clipboard

Error: 单开会话的时候,智能体调用工具的时候出现中断不继续执行的问题!

Open wxw-123 opened this issue 4 months ago • 2 comments

1️⃣ 描述一下问题

进行工具调用的时候,执行复杂的任务的时候,多轮调用外部工具(目前使用的是作者的数据库分析工具和官方的mcp的数据可视化)。

Image Image Image Image Image Image Image

2️⃣ 报错日志

目前没有发现后台相关的日志报错

3️⃣ 相关截图

Image

#️⃣ 其他相关信息

调换其他硅基流动的模型,也是如此

**请问这种情况是什么原因呢,是对话管理的问题吗?可是我只有一个用户在进行访问,为啥会出现这种情况呢?

求解答**

wxw-123 avatar Sep 19 '25 05:09 wxw-123

chat_router.py 第 170 行的这里把日志输出打开后,记录下当报错发生的时候的最后一次输出是什么?


        try:
            # Output guard for streaming
            accumulated_content = ""
            async for msg, metadata in agent.stream_messages(messages, input_context=input_context):
                # logger.debug(f"msg: {msg.model_dump()}, metadata: {metadata}") <== 这里
                if isinstance(msg, AIMessageChunk):
                    accumulated_content += msg.content
                    if conf.enable_content_guard and content_guard.check(accumulated_content):
                        logger.warning(f"Sensitive content detected in stream: {accumulated_content}")
                        yield make_chunk(message="检测到敏感内容,已中断输出", status="error")
                        return

重点看一下 response_metadata 是否正常。

xerrors avatar Sep 19 '25 14:09 xerrors

现在出现终止的时候,是否是必定会出现重复的 “DeepSeek”的情况?另外,如果可以的话,可以贴一下其他模型出现类似错误的情况。

xerrors avatar Sep 19 '25 14:09 xerrors