Skip to content

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

Description

@Meguminnnnnnnn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    LibraryIssue concerns handwritten SDK/library runtime behavior.enhancementNew feature or request

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions