Change 'history' to 'memory' (#5203)

This commit is contained in:
Bilge Yücel 2023-06-26 13:43:06 +03:00 committed by GitHub
parent 7a9cf30063
commit f4e18e91a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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. 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( def conversational_agent_parameter_resolver(
@ -52,5 +52,5 @@ def conversational_agent_parameter_resolver(
"tool_names": agent.tm.get_tool_names(), "tool_names": agent.tm.get_tool_names(),
"tool_names_with_descriptions": agent.tm.get_tool_names_with_descriptions(), "tool_names_with_descriptions": agent.tm.get_tool_names_with_descriptions(),
"transcript": agent_step.transcript, "transcript": agent_step.transcript,
"history": agent.memory.load(), "memory": agent.memory.load(),
} }

View File

@ -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" "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" "{tool_names_with_descriptions}\n"
"The following is the previous conversation between a human and an AI:\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" "AI Agent responses must start with one of the following:\n"
"Thought: [AI Agent's reasoning process]\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" "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:" "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": { "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! # DO NOT ADD ANY NEW TEMPLATE IN HERE!
} }