fix: create_embedding broken response for input type str
This commit is contained in:
parent
ea1f88dd29
commit
0ce66bc080
1 changed files with 2 additions and 0 deletions
|
@ -720,6 +720,8 @@ class Llama:
|
||||||
assert self._model.model is not None
|
assert self._model.model is not None
|
||||||
model_name: str = model if model is not None else self.model_path
|
model_name: str = model if model is not None else self.model_path
|
||||||
|
|
||||||
|
input = input if isinstance(input, list) else [input]
|
||||||
|
|
||||||
# get numeric embeddings
|
# get numeric embeddings
|
||||||
embeds: List[List[float]]
|
embeds: List[List[float]]
|
||||||
total_tokens: int
|
total_tokens: int
|
||||||
|
|
Loading…
Reference in a new issue