From 6db75183ffc4943b116a944a868941c246f8dcfc Mon Sep 17 00:00:00 2001 From: Aymeric Date: Fri, 17 Jan 2025 18:04:16 +0100 Subject: [PATCH] Fix style --- src/smolagents/models.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/smolagents/models.py b/src/smolagents/models.py index 6db2552..0910c98 100644 --- a/src/smolagents/models.py +++ b/src/smolagents/models.py @@ -567,7 +567,7 @@ class OpenAIServerModel(Model): The API key to use for authentication. custom_role_conversions (`Dict{str, str]`, *optional*): Custom role conversion mapping to convert message roles in others. - Useful for specific models that do not support specific message roles like "system". + Useful for specific models that do not support specific message roles like "system". **kwargs: Additional keyword arguments to pass to the OpenAI API. """ @@ -603,9 +603,12 @@ class OpenAIServerModel(Model): tools_to_call_from: Optional[List[Tool]] = None, ) -> ChatMessage: messages = get_clean_message_list( - messages, role_conversions=( - self.custom_role_conversions if self.custom_role_conversions else tool_role_conversions - ) + messages, + role_conversions=( + self.custom_role_conversions + if self.custom_role_conversions + else tool_role_conversions + ), ) if tools_to_call_from: response = self.client.chat.completions.create(