mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
fix(factory.py): fix mistral api prompt formatting
This commit is contained in:
parent
ac867daadc
commit
dfac742324
1 changed files with 2 additions and 0 deletions
|
|
@ -137,6 +137,8 @@ def mistral_api_pt(messages):
|
|||
return messages
|
||||
elif c["type"] == "text" and isinstance(c["text"], str):
|
||||
texts += c["text"]
|
||||
elif isinstance(m["content"], str):
|
||||
texts = m["content"]
|
||||
new_m = {"role": m["role"], "content": texts}
|
||||
new_messages.append(new_m)
|
||||
return new_messages
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue