mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-30 11:39:03 +00:00
Bugfix - allow custom input variables in chat zero shot agent's prompt (#1624)
I was trying out the `chat-zero-shot-react-description` agent for
[qabot](dbbd31bb27/qabot/agents/data_query_chain.py (L35-L52)
)
but langchain 0.0.108 doesn't correctly use custom 'input_variables` in
the prompt template.
This commit is contained in:
parent
b3234bf3b0
commit
9ee2713272
@ -73,9 +73,9 @@ class ChatAgent(Agent):
|
||||
SystemMessagePromptTemplate.from_template(template),
|
||||
HumanMessagePromptTemplate.from_template("{input}\n\n{agent_scratchpad}"),
|
||||
]
|
||||
return ChatPromptTemplate(
|
||||
input_variables=["input", "agent_scratchpad"], messages=messages
|
||||
)
|
||||
if input_variables is None:
|
||||
input_variables = ["input", "agent_scratchpad"]
|
||||
return ChatPromptTemplate(input_variables=input_variables, messages=messages)
|
||||
|
||||
@classmethod
|
||||
def from_llm_and_tools(
|
||||
|
Loading…
Reference in New Issue
Block a user