partners: Add Perplexity Chat Integration (#30618)

Perplexity's importance in the space has been growing, so we think it's
time to add an official integration!

Note: following the release of `langchain-perplexity` to `pypi`, we
should be able to add `perplexity` as an extra in
`libs/langchain/pyproject.toml`, but we're blocked by a circular import
for now.

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: Chester Curme <chester.curme@gmail.com>
This commit is contained in:
Sydney Runkle
2025-04-03 12:09:14 -04:00
committed by GitHub
parent 87c02a1aff
commit 3814bd1ea7
28 changed files with 2595 additions and 2 deletions

View File

@@ -0,0 +1,8 @@
from langchain_perplexity import ChatPerplexity
def test_chat_perplexity_secrets() -> None:
model = ChatPerplexity(
model="llama-3.1-sonar-small-128k-online", pplx_api_key="foo"
)
assert "foo" not in str(model)