langchain
langchain copied to clipboard
Add human message as input variable to chat agent prompt creation
Add human message as input variable to chat agent prompt creation
This PR adds human message and system message input to CHAT_ZERO_SHOT_REACT_DESCRIPTION
agent, similar to conversational chat agent.
I met this issue trying to use create_prompt
function when using the BabyAGI agent with tools notebook, since BabyAGI uses βtaskβ instead of βinputβ input variable. For normal zero shot react agent this is fine because I can manually change the suffix to β{input}/n/n{agent_scratchpad}β just like the notebook, but I cannot do this with conversational chat agent, therefore blocking me to use BabyAGI with chat zero shot agent.
I tested this in my own project Chrome-GPT and this fix worked.
Request for review
Agents / Tools / Toolkits
- @vowelparrot
@vowelparrot Thanks!
lgtm, thanks @richardyc!