forked from phoenix/litellm-mirror
fix(huggingface_restapi.py): add support for additional hf embedding formats
This commit is contained in:
parent
5fe5149070
commit
add153d110
2 changed files with 9 additions and 2 deletions
|
@ -584,6 +584,14 @@ class Huggingface(BaseLLM):
|
|||
"embedding": embedding # flatten list returned from hf
|
||||
}
|
||||
)
|
||||
elif isinstance(embedding, list) and isinstance(embedding[0], float):
|
||||
output_data.append(
|
||||
{
|
||||
"object": "embedding",
|
||||
"index": idx,
|
||||
"embedding": embedding # flatten list returned from hf
|
||||
}
|
||||
)
|
||||
else:
|
||||
output_data.append(
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue