From b851ad4bc19246d1fa4ebd96f397ac2143d9ebc8 Mon Sep 17 00:00:00 2001 From: Yuanbo Li Date: Sat, 14 Sep 2024 17:08:34 +0800 Subject: [PATCH] fix style check --- api/core/model_runtime/model_providers/bedrock/llm/llm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/core/model_runtime/model_providers/bedrock/llm/llm.py b/api/core/model_runtime/model_providers/bedrock/llm/llm.py index d03567d97b8f5d..77bab0c2945887 100644 --- a/api/core/model_runtime/model_providers/bedrock/llm/llm.py +++ b/api/core/model_runtime/model_providers/bedrock/llm/llm.py @@ -442,10 +442,10 @@ def _convert_prompt_message_to_dict(self, message: PromptMessage) -> dict: try: url = message_content.data image_content = requests.get(url).content - if '?' in url: - url = url.split('?')[0] + if "?" in url: + url = url.split("?")[0] mime_type, _ = mimetypes.guess_type(url) - base64_data = base64.b64encode(image_content).decode('utf-8') + base64_data = base64.b64encode(image_content).decode("utf-8") except Exception as ex: raise ValueError(f"Failed to fetch image data from url {message_content.data}, {ex}") else: