Browse Source

fix:解决agent_enable为false无法输出的bug

main
gjl 1 year ago
parent
commit
16a2e9b763
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/mindpilot/app/chat/chat.py

+ 2
- 2
src/mindpilot/app/chat/chat.py View File

@@ -63,7 +63,8 @@ def create_models_chains(
[i.to_msg_template() for i in history] [i.to_msg_template() for i in history]
) )
else: else:
chat_prompt = ChatPromptTemplate.from_messages([])
# TODO 完善
chat_prompt = ChatPromptTemplate.from_messages([("system", "您好,我是智能Agent桌面助手MindPilot,请问有什么可以帮您?")])


llm = models llm = models
llm.callbacks = callbacks llm.callbacks = callbacks
@@ -142,7 +143,6 @@ async def chat(
tools = [tool for tool in all_tools if tool.name in tool_configs] tools = [tool for tool in all_tools if tool.name in tool_configs]
tools = [t.copy(update={"callbacks": callbacks}) for t in tools] tools = [t.copy(update={"callbacks": callbacks}) for t in tools]


print(prompt)
full_chain = create_models_chains( full_chain = create_models_chains(
prompts=prompt, prompts=prompt,
models=model, models=model,


Loading…
Cancel
Save