Skip to content

Commit 4395890

Browse files
fix(huggingface_restapi.py): fix linting errors
1 parent 99dc7d2 commit 4395890

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

litellm/llms/huggingface_restapi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ class Huggingface(BaseLLM):
310310
def __init__(self) -> None:
311311
super().__init__()
312312

313-
def validate_environment(self, api_key, headers) -> dict:
313+
def _validate_environment(self, api_key, headers) -> dict:
314314
default_headers = {
315315
"content-type": "application/json",
316316
}
@@ -460,7 +460,7 @@ def completion(
460460
super().completion()
461461
exception_mapping_worked = False
462462
try:
463-
headers = self.validate_environment(api_key, headers)
463+
headers = self._validate_environment(api_key, headers)
464464
task, model = get_hf_task_for_model(model)
465465
## VALIDATE API FORMAT
466466
if task is None or not isinstance(task, str) or task not in hf_task_list:
@@ -890,7 +890,7 @@ def _process_embedding_response(
890890
model_response: litellm.EmbeddingResponse,
891891
model: str,
892892
input: List,
893-
encoding: Callable,
893+
encoding: Any,
894894
) -> litellm.EmbeddingResponse:
895895
output_data = []
896896
if "similarities" in embeddings:
@@ -1025,7 +1025,7 @@ def embedding(
10251025
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
10261026
) -> litellm.EmbeddingResponse:
10271027
super().embedding()
1028-
headers = self.validate_environment(api_key, headers=None)
1028+
headers = self._validate_environment(api_key, headers=None)
10291029
# print_verbose(f"{model}, {task}")
10301030
embed_url = ""
10311031
if "https" in model:

0 commit comments

Comments
 (0)