mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-12-18 18:47:11 +00:00
Only add the image_url to the constructed chat message if it is a url
This commit is contained in:
parent
991577aa17
commit
224abd14e0
1 changed files with 2 additions and 1 deletions
|
@ -344,6 +344,7 @@ def construct_structured_message(
|
|||
constructed_messages.append({"type": "text", "text": attached_file_context})
|
||||
if vision_enabled and images:
|
||||
for image in images:
|
||||
if image.startswith("https://"):
|
||||
constructed_messages.append({"type": "image_url", "image_url": {"url": image}})
|
||||
return constructed_messages
|
||||
|
||||
|
|
Loading…
Reference in a new issue