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
Thanks for reporting, @dramdass. I'm not sure we'd prioritize a fix here, but we'd likely accept a contribution that updates the module client to match the non-module client.
The right fix seems to be in src/__init__.py but the comment says # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.. I could't find a relevant place in the schema here https://github.com/openai/openai-openapi/tree/master to generate it. Can I add the fix manually into src/__init__.py?
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
The issue is that the
base_url
in theOpenAI
client enforces a trailing slash whereas setting the moduleopenai.base_url
does not enforce.This is 100% reproducible and while it can be worked around, the inconsistency in clients causes issues in scripts that use both clients.
To Reproduce
base_url
without a trailing slash. See error with URL for completionsbase_url
without a trailing slash. See no erros.Code snippets
This works
This does not:
Error:
OS
macOS
Python version
Python v3.12
Library version
openai v1.23.6
The text was updated successfully, but these errors were encountered: