(fix) bedrock - embedding - support str input

This commit is contained in:
ishaan-jaff 2024-01-11 23:02:12 +05:30
parent a876748bf5
commit a9d812eb8d

View file

@ -737,7 +737,17 @@ def embedding(
aws_region_name=aws_region_name,
aws_bedrock_runtime_endpoint=aws_bedrock_runtime_endpoint,
)
if type(input) == str:
embeddings = [
_embedding_func_single(
model,
input,
optional_params=optional_params,
client=client,
logging_obj=logging_obj,
)
]
else:
## Embedding Call
embeddings = [
_embedding_func_single(