fixed g3 adapter back

This commit is contained in:
Concedo 2025-04-12 23:17:54 +08:00
parent 9f94f62768
commit a6149ad0fc
4 changed files with 10 additions and 9 deletions

View file

@ -2083,6 +2083,7 @@ def transform_genparams(genparams, api_format):
elif item['type']=="image_url":
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])
messages_string += "\n(Attached Image)\n"
# 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):
# Check if user is passing a openai tools array, if so add to end of prompt before assistant prompt unless tool_choice has been set to None