Fix style

This commit is contained in:
Aymeric 2025-01-17 18:04:16 +01:00
parent d8591dc703
commit 6db75183ff
1 changed files with 7 additions and 4 deletions

View File

@ -603,9 +603,12 @@ class OpenAIServerModel(Model):
tools_to_call_from: Optional[List[Tool]] = None, tools_to_call_from: Optional[List[Tool]] = None,
) -> ChatMessage: ) -> ChatMessage:
messages = get_clean_message_list( messages = get_clean_message_list(
messages, role_conversions=( messages,
self.custom_role_conversions if self.custom_role_conversions else tool_role_conversions role_conversions=(
) self.custom_role_conversions
if self.custom_role_conversions
else tool_role_conversions
),
) )
if tools_to_call_from: if tools_to_call_from:
response = self.client.chat.completions.create( response = self.client.chat.completions.create(