Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
hanouticelina committed Feb 5, 2025
1 parent f2208ae commit d43462a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/huggingface_hub/inference/_providers/fal_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def prepare_request(
raise ValueError(
"You must provide an api_key to work with fal.ai API or log in with `huggingface-cli login`."
)
mapped_model = self.map_model(model=model)
mapped_model = self.map_model(model)
headers = {
**build_hf_headers(token=api_key),
**headers,
Expand Down
2 changes: 1 addition & 1 deletion src/huggingface_hub/inference/_providers/hf_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def prepare_request(
) -> RequestParameters:
if extra_payload is None:
extra_payload = {}
model = self.map_model(model=model)
model = self.map_model(model)
url = self.build_url(model)
data, json = self._prepare_payload(inputs, parameters=parameters, model=model, extra_payload=extra_payload)
headers = self.prepare_headers(headers=headers, api_key=api_key)
Expand Down
2 changes: 1 addition & 1 deletion src/huggingface_hub/inference/_providers/replicate.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def prepare_request(
base_url = BASE_URL
logger.info("Calling Replicate provider directly.")

mapped_model = self.map_model(model=model)
mapped_model = self.map_model(model)
url = _build_url(base_url, mapped_model)

headers = {
Expand Down
2 changes: 1 addition & 1 deletion src/huggingface_hub/inference/_providers/sambanova.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def prepare_request(
logger.info("Calling Sambanova provider directly.")
headers = {**build_hf_headers(token=api_key), **headers}

mapped_model = self.map_model(model=model)
mapped_model = self.map_model(model)
payload = {
"messages": inputs,
**{k: v for k, v in parameters.items() if v is not None},
Expand Down
2 changes: 1 addition & 1 deletion src/huggingface_hub/inference/_providers/together.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def prepare_request(
else:
base_url = BASE_URL
logger.info("Calling Together provider directly.")
mapped_model = self.map_model(model=model)
mapped_model = self.map_model(model)
if "model" in parameters:
parameters["model"] = mapped_model
payload = self._prepare_payload(inputs, parameters=parameters)
Expand Down

0 comments on commit d43462a

Please sign in to comment.