mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-01-11 03:01:03 +01:00
mtmd: Fix API text completion when no images are sent
This commit is contained in:
parent
0ea62d88f6
commit
1fb5807859
|
|
@ -405,7 +405,7 @@ def completions_common(body: dict, is_legacy: bool = False, stream=False):
|
|||
echo = body['echo']
|
||||
|
||||
# Add messages to generate_params if present for multimodal processing
|
||||
if 'messages' in body:
|
||||
if body.get('messages'):
|
||||
generate_params['messages'] = body['messages']
|
||||
raw_images = convert_openai_messages_to_images(generate_params['messages'])
|
||||
if raw_images:
|
||||
|
|
|
|||
Loading…
Reference in a new issue