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 anthropic example #1041

Merged
merged 4 commits into from
Feb 16, 2023
Merged

add anthropic example #1041

merged 4 commits into from
Feb 16, 2023

Conversation

hwchase17
Copy link
Contributor

No description provided.

@@ -102,7 +102,7 @@ def _wrap_prompt(self, prompt: str) -> str:
if prompt.startswith(self.HUMAN_PROMPT):
return prompt # Already wrapped.
else:
return f"{self.HUMAN_PROMPT} {prompt}{self.AI_PROMPT} Sure, here you go:\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want to keep this, for compatibility with existing chains. Otherwise in response to e.g. a summarization prompt Claude will respond in a verbose way like

"Sure, here is a summary of the above document: "

which the downstream chain may not be expecting

@hwchase17 hwchase17 merged commit 19c2797 into master Feb 16, 2023
@hwchase17 hwchase17 deleted the harrison/anthropic-example branch February 16, 2023 07:04
dongreenberg pushed a commit to dongreenberg/langchain that referenced this pull request Feb 17, 2023
Co-authored-by: Ivan Vendrov <[email protected]>
Co-authored-by: Sasmitha Manathunga <[email protected]>
@blob42 blob42 mentioned this pull request Feb 21, 2023
zachschillaci27 pushed a commit to zachschillaci27/langchain that referenced this pull request Mar 8, 2023
Co-authored-by: Ivan Vendrov <[email protected]>
Co-authored-by: Sasmitha Manathunga <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants