Update databricks.md

fixes a couple of examples to use correct endpoints/point to correct models
This commit is contained in:
Daniel Liden 2024-06-27 09:36:45 -04:00 committed by GitHub
parent e1d844a9a0
commit 86010bc440
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)` |