Skip to content

Commit

Permalink
fix: remove repeated completion assignment in llm.py
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
WannaTen authored Nov 21, 2024
1 parent 12ed523 commit e35e430
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions openhands/llm/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit e35e430

Please sign in to comment.