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