From f4da81cc8d6c85c2e1ce99a2641e3378cecb11b2 Mon Sep 17 00:00:00 2001 From: Mateusz Szewczyk Date: Fri, 8 Nov 2024 13:11:43 +0100 Subject: [PATCH] change method name --- libs/ibm/langchain_ibm/chat_models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/ibm/langchain_ibm/chat_models.py b/libs/ibm/langchain_ibm/chat_models.py index 96506dd..aba2cf9 100644 --- a/libs/ibm/langchain_ibm/chat_models.py +++ b/libs/ibm/langchain_ibm/chat_models.py @@ -685,7 +685,7 @@ def _generate( return generate_from_stream(stream_iter) message_dicts, params = self._create_message_dicts(messages, stop, **kwargs) - updated_params = self._update_params(params, kwargs) + updated_params = self._merge_params(params, kwargs) response = self.watsonx_model.chat( messages=message_dicts, **(kwargs | {"params": updated_params}) @@ -700,7 +700,7 @@ def _stream( **kwargs: Any, ) -> Iterator[ChatGenerationChunk]: message_dicts, params = self._create_message_dicts(messages, stop, **kwargs) - updated_params = self._update_params(params, kwargs) + updated_params = self._merge_params(params, kwargs) default_chunk_class: Type[BaseMessageChunk] = AIMessageChunk base_generation_info: dict = {} @@ -744,7 +744,7 @@ def _stream( yield generation_chunk @staticmethod - def _update_params(params: dict, kwargs: dict) -> dict: + def _merge_params(params: dict, kwargs: dict) -> dict: param_updates = {} for k in [ "frequency_penalty",