mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
(feat) embedding() add bedrock/amazon.titan-embed-text-v1
This commit is contained in:
parent
8deeb52f7c
commit
2ad81bdd7b
2 changed files with 69 additions and 2 deletions
|
@ -1633,6 +1633,7 @@ def embedding(
|
|||
api_type: Optional[str] = None,
|
||||
caching: bool=False,
|
||||
custom_llm_provider=None,
|
||||
**kwargs
|
||||
):
|
||||
"""
|
||||
Embedding function that calls an API to generate embeddings for the given input.
|
||||
|
@ -1784,6 +1785,15 @@ def embedding(
|
|||
logging_obj=logging,
|
||||
model_response= EmbeddingResponse()
|
||||
)
|
||||
elif custom_llm_provider == "bedrock":
|
||||
response = bedrock.embedding(
|
||||
model=model,
|
||||
input=input,
|
||||
encoding=encoding,
|
||||
logging_obj=logging,
|
||||
optional_params=kwargs,
|
||||
model_response= EmbeddingResponse()
|
||||
)
|
||||
else:
|
||||
args = locals()
|
||||
raise ValueError(f"No valid embedding model args passed in - {args}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue