Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin committed Jan 24, 2025
1 parent 459e025 commit 221d01e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/huggingface_hub/inference/_providers/fal_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from abc import ABC, abstractmethod
from typing import Any, Dict, Optional, Union

from huggingface_hub.constants import INFERENCE_PROXY_TEMPLATE
from huggingface_hub import constants
from huggingface_hub.inference._common import RequestParameters, TaskProviderHelper
from huggingface_hub.utils import build_hf_headers, get_session, logging

Expand Down Expand Up @@ -51,7 +51,7 @@ def prepare_request(

# Route to the proxy if the api_key is a HF TOKEN
if api_key.startswith("hf_"):
base_url = INFERENCE_PROXY_TEMPLATE.format(provider="fal-ai")
base_url = constants.INFERENCE_PROXY_TEMPLATE.format(provider="fal-ai")
logger.info("Calling fal.ai provider through Hugging Face proxy.")
else:
base_url = BASE_URL
Expand Down
4 changes: 2 additions & 2 deletions src/huggingface_hub/inference/_providers/replicate.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
from typing import Any, Dict, Optional, Union

from huggingface_hub.constants import INFERENCE_PROXY_TEMPLATE
from huggingface_hub import constants
from huggingface_hub.inference._common import RequestParameters, TaskProviderHelper
from huggingface_hub.utils import build_hf_headers, get_session, logging

Expand Down Expand Up @@ -45,7 +45,7 @@ def prepare_request(

# Route to the proxy if the api_key is a HF TOKEN
if api_key.startswith("hf_"):
base_url = INFERENCE_PROXY_TEMPLATE.format(provider="replicate")
base_url = constants.INFERENCE_PROXY_TEMPLATE.format(provider="replicate")
logger.info("Calling Replicate provider through Hugging Face proxy.")
else:
base_url = BASE_URL
Expand Down
4 changes: 2 additions & 2 deletions src/huggingface_hub/inference/_providers/sambanova.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any, Dict, Optional, Union

from huggingface_hub.constants import INFERENCE_PROXY_TEMPLATE
from huggingface_hub import constants
from huggingface_hub.inference._common import RequestParameters, TaskProviderHelper
from huggingface_hub.utils import build_hf_headers, logging

Expand Down Expand Up @@ -48,7 +48,7 @@ def prepare_request(

# Route to the proxy if the api_key is a HF TOKEN
if api_key.startswith("hf_"):
base_url = INFERENCE_PROXY_TEMPLATE.format(provider="sambanova")
base_url = constants.INFERENCE_PROXY_TEMPLATE.format(provider="sambanova")
logger.info("Calling Sambanova provider through Hugging Face proxy.")
else:
base_url = BASE_URL
Expand Down
4 changes: 2 additions & 2 deletions src/huggingface_hub/inference/_providers/together.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from abc import ABC, abstractmethod
from typing import Any, Dict, Optional, Union

from huggingface_hub.constants import INFERENCE_PROXY_TEMPLATE
from huggingface_hub import constants
from huggingface_hub.inference._common import RequestParameters, TaskProviderHelper
from huggingface_hub.utils import build_hf_headers, logging

Expand Down Expand Up @@ -89,7 +89,7 @@ def prepare_request(

# Route to the proxy if the api_key is a HF TOKEN
if api_key.startswith("hf_"):
base_url = INFERENCE_PROXY_TEMPLATE.format(provider="together")
base_url = constants.INFERENCE_PROXY_TEMPLATE.format(provider="together")
logger.info("Calling Together provider through Hugging Face proxy.")
else:
base_url = BASE_URL
Expand Down

0 comments on commit 221d01e

Please sign in to comment.