Skip to content

[BUG] 简洁阐述问题 / agent知识库对话顺序错误 #5434

@Der1989

Description

@Der1989

问题描述 / Problem Description
在agent选用知识库工具对话中,必须调用工具才能复现,利用模板构建消息时

libs/chatchat-server/langchain_chatchat/agents/react/create_prompt_template.py:195
langchain_core.prompts.MessagesPlaceholder(variable_name="agent_scratchpad"),
这句硬编码仅适用agent内部调用,第二轮对话时给了第一轮intermediate_steps导至第二轮对话的提问始终在agent_scratchpad之前,模型看不懂要问的问题最终答非所问,看模型最终收到的提示词来回溯问题

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions