feat(sagemaker.py): support huggingface embedding models

This commit is contained in:
Krrish Dholakia 2023-12-06 11:41:00 -08:00
parent aefa4f36f9
commit 94f065f83c
3 changed files with 150 additions and 5 deletions

View file

@ -1906,6 +1906,16 @@ def embedding(
optional_params=kwargs,
model_response= EmbeddingResponse()
)
elif custom_llm_provider == "sagemaker":
response = sagemaker.embedding(
model=model,
input=input,
encoding=encoding,
logging_obj=logging,
optional_params=kwargs,
model_response= EmbeddingResponse(),
print_verbose=print_verbose
)
else:
args = locals()
raise ValueError(f"No valid embedding model args passed in - {args}")