From 528741a809043851461b64cdd27b5f813dd04e0c Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 29 Jul 2024 17:47:33 -0700 Subject: [PATCH] fix(factory.py): handle special keys for mistral chat template --- litellm/llms/prompt_templates/factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/llms/prompt_templates/factory.py b/litellm/llms/prompt_templates/factory.py index 2218fa56816..99b3f97e1de 100644 --- a/litellm/llms/prompt_templates/factory.py +++ b/litellm/llms/prompt_templates/factory.py @@ -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():