Skip to content

Commit

Permalink
fix: remove repeated completion assignment in llm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
WannaTen committed Nov 22, 2024
1 parent 39dad70 commit d1f8249
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions openhands/llm/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,8 @@ def __init__(
)
os.makedirs(self.config.log_completions_folder, exist_ok=True)

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,
)

# call init_model_info to initialize config.max_output_tokens
# which is used in partial function
with warnings.catch_warnings():
warnings.simplefilter('ignore')
self.init_model_info()
Expand Down

0 comments on commit d1f8249

Please sign in to comment.