mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
(feat) detect amazon.titan-embed-text-v1 as bedrock embedding model
This commit is contained in:
parent
f4a45ec35b
commit
9cfd218101
4 changed files with 7 additions and 4 deletions
|
@ -68,7 +68,7 @@ os.environ["AWS_REGION_NAME"] = "" # us-east-1, us-east-2, us-west-1, us-west-2
|
|||
```python
|
||||
from litellm import embedding
|
||||
response = embedding(
|
||||
model="bedrock/amazon.titan-embed-text-v1",
|
||||
model="amazon.titan-embed-text-v1",
|
||||
input=["good morning from litellm"],
|
||||
)
|
||||
print(response)
|
||||
|
@ -76,7 +76,7 @@ print(response)
|
|||
|
||||
| Model Name | Function Call |
|
||||
|----------------------|---------------------------------------------|
|
||||
| Titan Embeddings - G1 | `embedding(model="bedrock/amazon.titan-embed-text-v1", input=input)` |
|
||||
| Titan Embeddings - G1 | `embedding(model="amazon.titan-embed-text-v1", input=input)` |
|
||||
|
||||
|
||||
## Cohere Embedding Models
|
||||
|
|
|
@ -161,7 +161,7 @@ os.environ["AWS_REGION_NAME"] = "" # us-east-1, us-east-2, us-west-1,
|
|||
```python
|
||||
from litellm import embedding
|
||||
response = embedding(
|
||||
model="bedrock/amazon.titan-embed-text-v1",
|
||||
model="amazon.titan-embed-text-v1",
|
||||
input=["good morning from litellm"],
|
||||
)
|
||||
print(response)
|
||||
|
@ -171,4 +171,4 @@ print(response)
|
|||
|
||||
| Model Name | Function Call |
|
||||
|----------------------|---------------------------------------------|
|
||||
| Titan Embeddings - G1 | `embedding(model="bedrock/amazon.titan-embed-text-v1", input=input)` |
|
||||
| Titan Embeddings - G1 | `embedding(model="amazon.titan-embed-text-v1", input=input)` |
|
||||
|
|
|
@ -317,6 +317,7 @@ longer_context_model_fallback_dict: dict = {
|
|||
####### EMBEDDING MODELS ###################
|
||||
open_ai_embedding_models: List = ["text-embedding-ada-002"]
|
||||
cohere_embedding_models: List = ["embed-english-v2.0", "embed-english-light-v2.0", "embed-multilingual-v2.0"]
|
||||
bedrock_embedding_models: List = ["amazon.titan-embed-text-v1"]
|
||||
|
||||
from .timeout import timeout
|
||||
from .testing import *
|
||||
|
|
|
@ -1700,6 +1700,8 @@ def get_llm_provider(model: str, custom_llm_provider: Optional[str] = None, api_
|
|||
# cohere embeddings
|
||||
elif model in litellm.cohere_embedding_models:
|
||||
custom_llm_provider = "cohere"
|
||||
elif model in litellm.bedrock_embedding_models:
|
||||
custom_llm_provider = "bedrock"
|
||||
|
||||
if custom_llm_provider is None or custom_llm_provider=="":
|
||||
print()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue