InferenceClient
alignment with base_url
as in OpenAI
client
#2414
Labels
bug
Something isn't working
InferenceClient
alignment with base_url
as in OpenAI
client
#2414
Describe the bug
Hi here @Wauplin!
I've just experimented a bit with the
InferenceClient
and thebase_url
is not provided as<URL>/v1
as in theOpenAI
client, but as<URL>
which is not fully compatible with OpenAI where we do need to provide the URL including the /v1 endpoint path.For a better compatibility and seamless integration with the OpenAI client, we could allow the
base_url
to be provided including the/v1
endpoint path, but removing it if provided, or something like that. I'm unsure about the potential issues of stripping the providedbase_url
tho.Reproduction
Which is solved at the moment as follows:
Logs
Raises the following error: huggingface_hub.utils._errors.HfHubHTTPError: 404 Client Error: Not Found for url: http://0.0.0.0:8080/v1/v1/chat/completions
System info
The text was updated successfully, but these errors were encountered: