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

Community: Adding citations in AIMessage for ChatPerplexity #28321

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

keenborder786
Copy link
Contributor

Description: Adding Citation in response payload of ChatPerplexity
Issue: #28108

Copy link

vercel bot commented Nov 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Nov 23, 2024 11:35pm

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. community Related to langchain-community labels Nov 23, 2024
@ccurme ccurme self-assigned this Nov 25, 2024
@ccurme
Copy link
Collaborator

ccurme commented Nov 25, 2024

@grantwwoodford @sam-bercovici can you confirm this solution works for you?

@grantwwoodford
Copy link

@ccurme Yes, this fix works.

Citations appear in:
response.additional_kwargs['citations']

@sam-bercovici
Copy link

sam-bercovici commented Nov 26, 2024

HI @grantwwoodford ,

  • The fix works
  • Should this fix be reflected in the documentation?
  • Out of curiosity, do you know why langchain choose to define additional_kwargs instead of using the pydnatic model_extra that exists in all the data objects?

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Nov 26, 2024
@ccurme ccurme merged commit 195ae7b into langchain-ai:master Nov 26, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Related to langchain-community lgtm PR looks good. Use to confirm that a PR is ready for merging. size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants