fix(factory.py): handle special keys for mistral chat template

This commit is contained in:
Krrish Dholakia 2024-07-29 17:47:33 -07:00
parent c3ac6b098e
commit 528741a809

View file

@ -235,7 +235,7 @@ def mistral_api_pt(messages):
"""
new_messages = []
for m in messages:
special_keys = ["role", "content", "tool_calls"]
special_keys = ["role", "content", "tool_calls", "function_call"]
extra_args = {}
if isinstance(m, dict):
for k, v in m.items():