mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-09 14:35:50 +00:00
langchain[patch]: Pass kwargs to chat fireworks (#14183)
Otherwise `.bind()` isn't really any good
This commit is contained in:
parent
e961c57fd2
commit
246dc4f9cc
@ -135,6 +135,7 @@ class ChatFireworks(BaseChatModel):
|
|||||||
"model": self.model,
|
"model": self.model,
|
||||||
"messages": message_dicts,
|
"messages": message_dicts,
|
||||||
**self.model_kwargs,
|
**self.model_kwargs,
|
||||||
|
**kwargs,
|
||||||
}
|
}
|
||||||
response = completion_with_retry(
|
response = completion_with_retry(
|
||||||
self,
|
self,
|
||||||
@ -157,6 +158,7 @@ class ChatFireworks(BaseChatModel):
|
|||||||
"model": self.model,
|
"model": self.model,
|
||||||
"messages": message_dicts,
|
"messages": message_dicts,
|
||||||
**self.model_kwargs,
|
**self.model_kwargs,
|
||||||
|
**kwargs,
|
||||||
}
|
}
|
||||||
response = await acompletion_with_retry(
|
response = await acompletion_with_retry(
|
||||||
self, self.use_retry, run_manager=run_manager, stop=stop, **params
|
self, self.use_retry, run_manager=run_manager, stop=stop, **params
|
||||||
@ -200,6 +202,7 @@ class ChatFireworks(BaseChatModel):
|
|||||||
"messages": message_dicts,
|
"messages": message_dicts,
|
||||||
"stream": True,
|
"stream": True,
|
||||||
**self.model_kwargs,
|
**self.model_kwargs,
|
||||||
|
**kwargs,
|
||||||
}
|
}
|
||||||
for chunk in completion_with_retry(
|
for chunk in completion_with_retry(
|
||||||
self, self.use_retry, run_manager=run_manager, stop=stop, **params
|
self, self.use_retry, run_manager=run_manager, stop=stop, **params
|
||||||
@ -230,6 +233,7 @@ class ChatFireworks(BaseChatModel):
|
|||||||
"messages": message_dicts,
|
"messages": message_dicts,
|
||||||
"stream": True,
|
"stream": True,
|
||||||
**self.model_kwargs,
|
**self.model_kwargs,
|
||||||
|
**kwargs,
|
||||||
}
|
}
|
||||||
async for chunk in await acompletion_with_retry_streaming(
|
async for chunk in await acompletion_with_retry_streaming(
|
||||||
self, self.use_retry, run_manager=run_manager, stop=stop, **params
|
self, self.use_retry, run_manager=run_manager, stop=stop, **params
|
||||||
|
Loading…
Reference in New Issue
Block a user