mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-07 21:29:13 +00:00
Only add the image_url to the constructed chat message if it is a url
This commit is contained in:
@@ -344,6 +344,7 @@ def construct_structured_message(
|
|||||||
constructed_messages.append({"type": "text", "text": attached_file_context})
|
constructed_messages.append({"type": "text", "text": attached_file_context})
|
||||||
if vision_enabled and images:
|
if vision_enabled and images:
|
||||||
for image in images:
|
for image in images:
|
||||||
|
if image.startswith("https://"):
|
||||||
constructed_messages.append({"type": "image_url", "image_url": {"url": image}})
|
constructed_messages.append({"type": "image_url", "image_url": {"url": image}})
|
||||||
return constructed_messages
|
return constructed_messages
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user