Skip to content

Commit 58b5a8e

Browse files
fix: Fix error message when late interaction model name not found (#365)
chore: Updated type hint
1 parent 519b310 commit 58b5a8e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

fastembed/late_interaction/colbert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def embed(
185185
**kwargs,
186186
)
187187

188-
def query_embed(self, query: Union[str, List[str]], **kwargs) -> np.ndarray:
188+
def query_embed(self, query: Union[str, List[str]], **kwargs) -> Iterable[np.ndarray]:
189189
if isinstance(query, str):
190190
query = [query]
191191

fastembed/late_interaction/late_interaction_text_embedding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ def __init__(
6464
return
6565

6666
raise ValueError(
67-
f"Model {model_name} is not supported in SparseTextEmbedding."
68-
"Please check the supported models using `SparseTextEmbedding.list_supported_models()`"
67+
f"Model {model_name} is not supported in LateInteractionTextEmbedding."
68+
"Please check the supported models using `LateInteractionTextEmbedding.list_supported_models()`"
6969
)
7070

7171
def embed(

0 commit comments

Comments
 (0)