We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d5efd6 commit a66d0f7Copy full SHA for a66d0f7
koboldcpp.py
@@ -1905,7 +1905,7 @@ def transform_genparams(genparams, api_format):
1905
if item['type']=="text":
1906
messages_string += item['text']
1907
elif item['type']=="image_url":
1908
- if item['image_url'] and item['image_url']['url'] and item['image_url']['url'].startswith("data:image"):
+ if 'image_url' in item and item['image_url'] and item['image_url']['url'] and item['image_url']['url'].startswith("data:image"):
1909
images_added.append(item['image_url']['url'].split(",", 1)[1])
1910
# If last message, add any tools calls after message content and before message end token if any
1911
if message['role'] == "user" and message_index == len(messages_array):
0 commit comments