From e35e430fd9ece28b13305c9e59a47af94d9ffc33 Mon Sep 17 00:00:00 2001 From: niliy01 Date: Thu, 21 Nov 2024 13:25:37 +0800 Subject: [PATCH] fix: remove repeated completion assignment in llm.py This duplicate code is introduced here: https://github.com/All-Hands-AI/OpenHands/pull/4722/files#diff-b46ec9dd4b319d75809520e34b2559fd2ce46ca4895709eae9312aa04a8fa9a, I don't know what its purpose is, so send a pr to delete. --- openhands/llm/llm.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/openhands/llm/llm.py b/openhands/llm/llm.py index 6faf2c6605f4f..0c7737b432bca 100644 --- a/openhands/llm/llm.py +++ b/openhands/llm/llm.py @@ -122,27 +122,6 @@ def __init__( drop_params=self.config.drop_params, ) - if self.vision_is_active(): - logger.debug('LLM: model has vision enabled') - if self.is_caching_prompt_active(): - logger.debug('LLM: caching prompt enabled') - if self.is_function_calling_active(): - logger.debug('LLM: model supports function calling') - - self._completion = partial( - litellm_completion, - model=self.config.model, - api_key=self.config.api_key, - base_url=self.config.base_url, - api_version=self.config.api_version, - custom_llm_provider=self.config.custom_llm_provider, - max_tokens=self.config.max_output_tokens, - timeout=self.config.timeout, - temperature=self.config.temperature, - top_p=self.config.top_p, - drop_params=self.config.drop_params, - ) - with warnings.catch_warnings(): warnings.simplefilter('ignore') self.init_model_info()