From 256107c9990d5e8a66141c2110c1d12e813e913b Mon Sep 17 00:00:00 2001 From: Kade Heckel Date: Thu, 9 May 2024 12:06:51 +0100 Subject: [PATCH] Added Ollama LLMs for LLaMa and Mistral --- litellm/utils.py | 2 +- model_prices_and_context_window.json | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/litellm/utils.py b/litellm/utils.py index d1af1b44a7b..fab8beb14fb 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -6620,7 +6620,7 @@ def get_max_tokens(model: str): raise Exception() except: raise Exception( - "This model isn't mapped yet. Add it here - https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json" + f"Model {model} from provider {custom_llm_provider} isn't mapped yet. Add it here - https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json" ) diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index cb0f54aa6ab..d9dc82d54aa 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -2749,6 +2749,24 @@ "litellm_provider": "ollama", "mode": "completion" }, + "ollama/llama3": { + "max_tokens": 8192, + "max_input_tokens": 8192, + "max_output_tokens": 8192, + "input_cost_per_token": 0.00000010, + "output_cost_per_token": 0.00000010, + "litellm_provider": "ollama", + "mode": "chat" + }, + "ollama/llama3:70b": { + "max_tokens": 8192, + "max_input_tokens": 8192, + "max_output_tokens": 8192, + "input_cost_per_token": 0.0, + "output_cost_per_token": 0.0, + "litellm_provider": "ollama", + "mode": "chat" + }, "ollama/mistral": { "max_tokens": 8192, "max_input_tokens": 8192,