mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 09:34:37 +00:00
safeguard for bad vision input
This commit is contained in:
parent
9d5efd68b6
commit
a66d0f7743
1 changed files with 1 additions and 1 deletions
|
@ -1905,7 +1905,7 @@ def transform_genparams(genparams, api_format):
|
|||
if item['type']=="text":
|
||||
messages_string += item['text']
|
||||
elif item['type']=="image_url":
|
||||
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"):
|
||||
images_added.append(item['image_url']['url'].split(",", 1)[1])
|
||||
# If last message, add any tools calls after message content and before message end token if any
|
||||
if message['role'] == "user" and message_index == len(messages_array):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue