Skip to content

Commit

Permalink
fix style check
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuanbo Li committed Sep 14, 2024
1 parent b87eff0 commit b851ad4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/core/model_runtime/model_providers/bedrock/llm/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b851ad4

Please sign in to comment.