Skip to content

Comments

community: use Perplexity API instead of OpenAI client for full functionality#30394

Closed
David Sánchez Sánchez (DavidSanSan110) wants to merge 2 commits intolangchain-ai:masterfrom
DavidSanSan110:davidsansan/update-perplexity-model
Closed

community: use Perplexity API instead of OpenAI client for full functionality#30394
David Sánchez Sánchez (DavidSanSan110) wants to merge 2 commits intolangchain-ai:masterfrom
DavidSanSan110:davidsansan/update-perplexity-model

Conversation

@DavidSanSan110
Copy link
Contributor

@DavidSanSan110 David Sánchez Sánchez (DavidSanSan110) commented Mar 20, 2025

This PR updates the ChatPerplexity wrapper to use the Perplexity API directly instead of the OpenAI client. Previously, the OpenAI client was used to call Perplexity, but it does not support certain Perplexity-specific parameters such as search_domain_filter and search_recency_filter. By switching to the Perplexity API, this change unlocks the full functionality of Perplexity within LangChain.

Issue: resolves #30393

Dependencies: None

Tests and Documentation:

  • Added new tests to validate the functionality of the Perplexity API integration.
  • Updated existing tests to ensure compatibility with the new implementation.

@vercel
Copy link

vercel bot commented Mar 20, 2025

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 Mar 20, 2025 4:43pm

@dosubot dosubot bot added size:L labels Mar 20, 2025
Copy link
Collaborator

@ccurme ccurme (ccurme) left a comment

Choose a reason for hiding this comment

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

Thanks for this, left a question on the issue.

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.

Switch from OpenAI Client to Perplexity API for Full Functionality

2 participants