From 246dc4f9cca1d9111a7b93f094c04a33dcb5d4be Mon Sep 17 00:00:00 2001 From: William FH <13333726+hinthornw@users.noreply.github.com> Date: Sun, 3 Dec 2023 15:12:02 -0800 Subject: [PATCH] langchain[patch]: Pass kwargs to chat fireworks (#14183) Otherwise `.bind()` isn't really any good --- libs/langchain/langchain/chat_models/fireworks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/langchain/langchain/chat_models/fireworks.py b/libs/langchain/langchain/chat_models/fireworks.py index 0512ea37a77..06e9dacdbcd 100644 --- a/libs/langchain/langchain/chat_models/fireworks.py +++ b/libs/langchain/langchain/chat_models/fireworks.py @@ -135,6 +135,7 @@ class ChatFireworks(BaseChatModel): "model": self.model, "messages": message_dicts, **self.model_kwargs, + **kwargs, } response = completion_with_retry( self, @@ -157,6 +158,7 @@ class ChatFireworks(BaseChatModel): "model": self.model, "messages": message_dicts, **self.model_kwargs, + **kwargs, } response = await acompletion_with_retry( self, self.use_retry, run_manager=run_manager, stop=stop, **params @@ -200,6 +202,7 @@ class ChatFireworks(BaseChatModel): "messages": message_dicts, "stream": True, **self.model_kwargs, + **kwargs, } for chunk in completion_with_retry( self, self.use_retry, run_manager=run_manager, stop=stop, **params @@ -230,6 +233,7 @@ class ChatFireworks(BaseChatModel): "messages": message_dicts, "stream": True, **self.model_kwargs, + **kwargs, } async for chunk in await acompletion_with_retry_streaming( self, self.use_retry, run_manager=run_manager, stop=stop, **params