Merge pull request #5348 from oobabooga/dev

Merge dev branch
This commit is contained in:
oobabooga 2024-01-22 11:18:46 -03:00 committed by GitHub
commit 837bd888e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -154,7 +154,7 @@ def convert_history(history):
system_message = ""
# 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 = []
for entry in history:
if isinstance(entry['content'], list):