From 349b5c91c2a5d2da6c261b40dafdd31401e5c494 Mon Sep 17 00:00:00 2001 From: ThomasSaulou <54414107+ThomasSaulou@users.noreply.github.com> Date: Mon, 13 Jan 2025 15:31:37 +0100 Subject: [PATCH] fix chatperplexity: remove 'stream' from params in _stream method (#29173) quick fix chatperplexity: remove 'stream' from params in _stream method --- libs/community/langchain_community/chat_models/perplexity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/community/langchain_community/chat_models/perplexity.py b/libs/community/langchain_community/chat_models/perplexity.py index d168b1363e5..f5a58def0e9 100644 --- a/libs/community/langchain_community/chat_models/perplexity.py +++ b/libs/community/langchain_community/chat_models/perplexity.py @@ -217,7 +217,7 @@ class ChatPerplexity(BaseChatModel): message_dicts, params = self._create_message_dicts(messages, stop) params = {**params, **kwargs} default_chunk_class = AIMessageChunk - + params.pop("stream", None) if stop: params["stop_sequences"] = stop stream_resp = self.client.chat.completions.create(