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
.
The current code uses urllib.parse.urljoin(self.api_url, path) to concatenate URLs, but this results in incorrect URLs when concatenating URLs like http://localhost:5000/anthropic and /v1/complete, giving http://localhost:5000/v1/complete instead of the expected http://localhost:5000/anthropic/v1/complete.
A possible fix could be to directly concatenate the strings, like: abs_url = "%s%s" % (self.api_base, url)
as implemented in the OpenAI API requestor: https://github.com/openai/openai-python/blob/db3f3526f16ea518bcd16308508e035017f9259e/openai/api_requestor.py#L467
The text was updated successfully, but these errors were encountered:
I noticed a small issue with the URL concatenation logic in
anthropic-sdk-python/anthropic/api.py
Line 71 in 4187c65
The current code uses urllib.parse.urljoin(self.api_url, path) to concatenate URLs, but this results in incorrect URLs when concatenating URLs like
http://localhost:5000/anthropic
and/v1/complete
, givinghttp://localhost:5000/v1/complete
instead of the expectedhttp://localhost:5000/anthropic/v1/complete
.A possible fix could be to directly concatenate the strings, like:
abs_url = "%s%s" % (self.api_base, url)
as implemented in the OpenAI API requestor:
https://github.com/openai/openai-python/blob/db3f3526f16ea518bcd16308508e035017f9259e/openai/api_requestor.py#L467
The text was updated successfully, but these errors were encountered: