API: minor fix
This commit is contained in:
parent
821dd65fb3
commit
aa575119e6
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@ def convert_history(history):
|
||||||
system_message = ""
|
system_message = ""
|
||||||
|
|
||||||
# Multimodal: convert OpenAI format to multimodal extension format
|
# Multimodal: convert OpenAI format to multimodal extension format
|
||||||
if any(isinstance(entry['content'], list) for entry in history):
|
if any('content' in entry and isinstance(entry['content'], list) for entry in history):
|
||||||
new_history = []
|
new_history = []
|
||||||
for entry in history:
|
for entry in history:
|
||||||
if isinstance(entry['content'], list):
|
if isinstance(entry['content'], list):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue