Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add human message as input variable to chat agent prompt creation #4542

Merged
merged 1 commit into from
May 18, 2023

Conversation

richardyc
Copy link
Contributor

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

@richardyc
Copy link
Contributor Author

@vowelparrot Thanks!

@dev2049
Copy link
Contributor

dev2049 commented May 17, 2023

lgtm, thanks @richardyc!

@dev2049 dev2049 added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label May 17, 2023
@hwchase17 hwchase17 merged commit 7642f21 into langchain-ai:master May 18, 2023
@danielchalef danielchalef mentioned this pull request Jun 5, 2023
This was referenced Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm PR looks good. Use to confirm that a PR is ready for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants