From af33a85043345124eff8584618539ae2774fa972 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 5 Sep 2023 12:25:52 -0700 Subject: [PATCH] only use tgai's prompt template for llama2 instruct models --- 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 d62db1d80a7..4056e43e985 100644 --- a/litellm/llms/prompt_templates/factory.py +++ b/litellm/llms/prompt_templates/factory.py @@ -111,7 +111,7 @@ def prompt_factory(model: str, messages: list): return wizardcoder_pt(messages=messages) elif "phind/phind-codellama" in model: return phind_codellama_pt(messages=messages) - elif "togethercomputer/llama-2" in model: + elif "togethercomputer/llama-2" in model and "instruct" in model: return togetherai_llama_2_chat_pt(messages=messages) else: return default_pt(messages=messages) \ No newline at end of file