From e1d844a9a0548c5a6d15aa33ecd085b593d7bcca Mon Sep 17 00:00:00 2001 From: Daniel Liden Date: Thu, 27 Jun 2024 09:11:09 -0400 Subject: [PATCH 1/3] Update databricks.md updates some references to predibase to refer to Databricks --- docs/my-website/docs/providers/databricks.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/my-website/docs/providers/databricks.md b/docs/my-website/docs/providers/databricks.md index 24c7c40cff9..fcc1d481346 100644 --- a/docs/my-website/docs/providers/databricks.md +++ b/docs/my-website/docs/providers/databricks.md @@ -27,7 +27,7 @@ import os os.environ["DATABRICKS_API_KEY"] = "databricks key" os.environ["DATABRICKS_API_BASE"] = "databricks base url" # e.g.: https://adb-3064715882934586.6.azuredatabricks.net/serving-endpoints -# predibase llama-3 call +# Databricks dbrx-instruct call response = completion( model="databricks/databricks-dbrx-instruct", messages = [{ "content": "Hello, how are you?","role": "user"}] @@ -143,8 +143,8 @@ response = completion( model_list: - model_name: llama-3 litellm_params: - model: predibase/llama-3-8b-instruct - api_key: os.environ/PREDIBASE_API_KEY + model: databricks/databricks-dbrx-instruct + api_key: os.environ/DATABRICKS_API_KEY max_tokens: 20 temperature: 0.5 ``` @@ -162,7 +162,7 @@ import os os.environ["DATABRICKS_API_KEY"] = "databricks key" os.environ["DATABRICKS_API_BASE"] = "databricks url" -# predibase llama3 call +# Databricks bge-large-en call response = litellm.embedding( model="databricks/databricks-bge-large-en", input=["good morning from litellm"], From 86010bc440f4022ce8565d3c0f05284ae53ec53f Mon Sep 17 00:00:00 2001 From: Daniel Liden Date: Thu, 27 Jun 2024 09:36:45 -0400 Subject: [PATCH 2/3] Update databricks.md fixes a couple of examples to use correct endpoints/point to correct models --- docs/my-website/docs/providers/databricks.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/my-website/docs/providers/databricks.md b/docs/my-website/docs/providers/databricks.md index fcc1d481346..c81b0174aee 100644 --- a/docs/my-website/docs/providers/databricks.md +++ b/docs/my-website/docs/providers/databricks.md @@ -143,13 +143,13 @@ response = completion( model_list: - model_name: llama-3 litellm_params: - model: databricks/databricks-dbrx-instruct + model: databricks/databricks-meta-llama-3-70b-instruct api_key: os.environ/DATABRICKS_API_KEY max_tokens: 20 temperature: 0.5 ``` -## Passings Database specific params - 'instruction' +## Passings Databricks specific params - 'instruction' For embedding models, databricks lets you pass in an additional param 'instruction'. [Full Spec](https://github.com/BerriAI/litellm/blob/43353c28b341df0d9992b45c6ce464222ebd7984/litellm/llms/databricks.py#L164) @@ -177,14 +177,13 @@ response = litellm.embedding( - model_name: bge-large litellm_params: model: databricks/databricks-bge-large-en - api_key: os.environ/DATABRICKS_API_KEY - api_base: os.environ/DATABRICKS_API_BASE + api_key: ${DATABRICKS_API_KEY} + api_base: ${DATABRICKS_API_BASE} instruction: "Represent this sentence for searching relevant passages:" ``` ## Supported Databricks Chat Completion Models -Here's an example of using a Databricks models with LiteLLM | Model Name | Command | |----------------------------|------------------------------------------------------------------| @@ -196,8 +195,8 @@ Here's an example of using a Databricks models with LiteLLM | databricks-mpt-7b-instruct | `completion(model='databricks/databricks-mpt-7b-instruct', messages=messages)` | ## Supported Databricks Embedding Models -Here's an example of using a databricks models with LiteLLM | Model Name | Command | |----------------------------|------------------------------------------------------------------| -| databricks-bge-large-en | `completion(model='databricks/databricks-bge-large-en', messages=messages)` | +| databricks-bge-large-en | `embedding(model='databricks/databricks-bge-large-en', messages=messages)` | +| databricks-gte-large-en | `embedding(model='databricks/databricks-gte-large-en', messages=messages)` | From 101bd38996e561820a7853b9142561d69af17a89 Mon Sep 17 00:00:00 2001 From: Daniel Liden Date: Thu, 27 Jun 2024 12:51:00 -0400 Subject: [PATCH 3/3] undoes changes to proxy yaml api key/base --- docs/my-website/docs/providers/databricks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/my-website/docs/providers/databricks.md b/docs/my-website/docs/providers/databricks.md index c81b0174aee..633350d2203 100644 --- a/docs/my-website/docs/providers/databricks.md +++ b/docs/my-website/docs/providers/databricks.md @@ -177,8 +177,8 @@ response = litellm.embedding( - model_name: bge-large litellm_params: model: databricks/databricks-bge-large-en - api_key: ${DATABRICKS_API_KEY} - api_base: ${DATABRICKS_API_BASE} + api_key: os.environ/DATABRICKS_API_KEY + api_base: os.environ/DATABRICKS_API_BASE instruction: "Represent this sentence for searching relevant passages:" ```