refactor: text-embedding interfaces to returns list[int]

This commit is contained in:
Yeuoly
2024-11-22 18:09:33 +08:00
parent a6835ac64d
commit cfa7c89dfe
7 changed files with 76 additions and 20 deletions

View File

@ -219,7 +219,7 @@ class ModelInstance:
input_type=input_type,
)
def get_text_embedding_num_tokens(self, texts: list[str]) -> int:
def get_text_embedding_num_tokens(self, texts: list[str]) -> list[int]:
"""
Get number of tokens for text embedding