Skip to content

Commit

Permalink
MAIN-2339 remove old support check code and use drop params (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
RoiGlinik authored Oct 16, 2024
1 parent 84f03a6 commit 5a547c4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions holmes/core/tool_calling_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ def __init__(
self.api_key = api_key
self.base_url = None

params = get_supported_openai_params(model=self.model)
self.support_response_format: bool = params and "response_format" in params

if ROBUSTA_AI:
self.base_url = ROBUSTA_API_ENDPOINT

Expand Down Expand Up @@ -131,7 +128,6 @@ def call(self, system_prompt, user_prompt, post_process_prompt: Optional[str] =
tool_calls = []
tools = self.tool_executor.get_all_tools_openai_format()

response_format = response_format if self.support_response_format else None
for i in range(self.max_steps):
logging.debug(f"running iteration {i}")
# on the last step we don't allow tools - we want to force a reply, not a request to run another tool
Expand All @@ -156,8 +152,8 @@ def call(self, system_prompt, user_prompt, post_process_prompt: Optional[str] =
tool_choice=tool_choice,
base_url=self.base_url,
temperature=0.00000001,
response_format=response_format

response_format=response_format,
drop_params=True
)
logging.debug(f"got response {full_response}")
# catch a known error that occurs with Azure and replace the error message with something more obvious to the user
Expand Down

0 comments on commit 5a547c4

Please sign in to comment.