You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
At the moment WithBaseURL only includes the Host part of the URL, so that giving it this kind of URL: https://api-inference.huggingface.co/v1 is not possible as it will remove the /v1 part.
To Reproduce
Use a URL with non empty Path in WithBaseURL
Describe the bug
At the moment WithBaseURL only includes the Host part of the URL, so that giving it this kind of URL: https://api-inference.huggingface.co/v1 is not possible as it will remove the /v1 part.
To Reproduce
Use a URL with non empty Path in WithBaseURL
Expected behavior
The base URL for calls in this case should be https://api-inference.huggingface.co/v1, not https://api-inference.huggingface.co
Additional context
This enables compatibility for example with HuggingFace https://huggingface.co/docs/api-inference/tasks/image-text-to-text?code=python (openAI example at the bottom), but also probably with plenty of APIs that use this kind of versioning.
The text was updated successfully, but these errors were encountered: