@@ -310,7 +310,7 @@ class Huggingface(BaseLLM):
310
310
def __init__ (self ) -> None :
311
311
super ().__init__ ()
312
312
313
- def validate_environment (self , api_key , headers ) -> dict :
313
+ def _validate_environment (self , api_key , headers ) -> dict :
314
314
default_headers = {
315
315
"content-type" : "application/json" ,
316
316
}
@@ -460,7 +460,7 @@ def completion(
460
460
super ().completion ()
461
461
exception_mapping_worked = False
462
462
try :
463
- headers = self .validate_environment (api_key , headers )
463
+ headers = self ._validate_environment (api_key , headers )
464
464
task , model = get_hf_task_for_model (model )
465
465
## VALIDATE API FORMAT
466
466
if task is None or not isinstance (task , str ) or task not in hf_task_list :
@@ -890,7 +890,7 @@ def _process_embedding_response(
890
890
model_response : litellm .EmbeddingResponse ,
891
891
model : str ,
892
892
input : List ,
893
- encoding : Callable ,
893
+ encoding : Any ,
894
894
) -> litellm .EmbeddingResponse :
895
895
output_data = []
896
896
if "similarities" in embeddings :
@@ -1025,7 +1025,7 @@ def embedding(
1025
1025
client : Optional [Union [HTTPHandler , AsyncHTTPHandler ]] = None ,
1026
1026
) -> litellm .EmbeddingResponse :
1027
1027
super ().embedding ()
1028
- headers = self .validate_environment (api_key , headers = None )
1028
+ headers = self ._validate_environment (api_key , headers = None )
1029
1029
# print_verbose(f"{model}, {task}")
1030
1030
embed_url = ""
1031
1031
if "https" in model :
0 commit comments