fix(router.py): fix aembedding type hints

Fixes https://github.com/BerriAI/litellm/issues/5383
This commit is contained in:
Krrish Dholakia 2024-08-27 14:29:18 -07:00
parent adcf1fc53d
commit c558648180

View file

@ -1930,7 +1930,7 @@ class Router:
input: Union[str, List], input: Union[str, List],
is_async: Optional[bool] = False, is_async: Optional[bool] = False,
**kwargs, **kwargs,
) -> Union[List[float], None]: ) -> litellm.EmbeddingResponse:
try: try:
kwargs["model"] = model kwargs["model"] = model
kwargs["input"] = input kwargs["input"] = input
@ -2018,7 +2018,7 @@ class Router:
input: Union[str, List], input: Union[str, List],
is_async: Optional[bool] = True, is_async: Optional[bool] = True,
**kwargs, **kwargs,
) -> Union[List[float], None]: ) -> litellm.EmbeddingResponse:
try: try:
kwargs["model"] = model kwargs["model"] = model
kwargs["input"] = input kwargs["input"] = input