Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A difference between the OpenAI Go SDK and Python SDK. #239

Open
Meguminnnnnnnn opened this issue Feb 26, 2025 · 0 comments
Open

A difference between the OpenAI Go SDK and Python SDK. #239

Meguminnnnnnnn opened this issue Feb 26, 2025 · 0 comments

Comments

@Meguminnnnnnnn
Copy link

When using Azure client, the Python SDK will check the path to determine whether to replace it, the code is as follows:

Image

And the URL in FinalRequestOptions is only the path of the API, such as /chat/completions, and does not include the path that may exist in the baseURL.

Image

But in the Go SDK, this value becomes the path of the entire request, so if the BaseURL contains a path, this path will also be included:

Image

However, in the subsequent processing, only the path of the API is still used for matching. This causes the matching to fail if the BaseURL contains a path (not just the domain), resulting in a failed request.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant