mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-09-25 16:15:35 +00:00
Change 'history' to 'memory' (#5203)
This commit is contained in:
parent
7a9cf30063
commit
f4e18e91a5
@ -37,7 +37,7 @@ def agent_without_tools_parameter_resolver(query: str, agent: "Agent", **kwargs)
|
||||
"""
|
||||
A parameter resolver for simple chat agents without tools that returns the query and the history.
|
||||
"""
|
||||
return {"query": query, "history": agent.memory.load()}
|
||||
return {"query": query, "memory": agent.memory.load()}
|
||||
|
||||
|
||||
def conversational_agent_parameter_resolver(
|
||||
@ -52,5 +52,5 @@ def conversational_agent_parameter_resolver(
|
||||
"tool_names": agent.tm.get_tool_names(),
|
||||
"tool_names_with_descriptions": agent.tm.get_tool_names_with_descriptions(),
|
||||
"transcript": agent_step.transcript,
|
||||
"history": agent.memory.load(),
|
||||
"memory": agent.memory.load(),
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ LEGACY_DEFAULT_TEMPLATES: Dict[str, Dict] = {
|
||||
"If the AI Agent is uncertain or concerned that the information may be outdated or inaccurate, it must use the available tools to find the most up-to-date information. The AI has access to these tools:\n"
|
||||
"{tool_names_with_descriptions}\n"
|
||||
"The following is the previous conversation between a human and an AI:\n"
|
||||
"{history}\n"
|
||||
"{memory}\n"
|
||||
"AI Agent responses must start with one of the following:\n"
|
||||
"Thought: [AI Agent's reasoning process]\n"
|
||||
"Tool: [{tool_names}] (on a new line) Tool Input: [input for the selected tool WITHOUT quotation marks and on a new line] (These must always be provided together and on separate lines.)\n"
|
||||
@ -174,7 +174,7 @@ LEGACY_DEFAULT_TEMPLATES: Dict[str, Dict] = {
|
||||
"prompt": "Condense the following chat transcript by shortening and summarizing the content without losing important information:\n{chat_transcript}\nCondensed Transcript:"
|
||||
},
|
||||
"conversational-agent-without-tools": {
|
||||
"prompt": "The following is a conversation between a human and an AI.\n{history}\nHuman: {query}\nAI:"
|
||||
"prompt": "The following is a conversation between a human and an AI.\n{memory}\nHuman: {query}\nAI:"
|
||||
},
|
||||
# DO NOT ADD ANY NEW TEMPLATE IN HERE!
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user