openai-python
openai-python copied to clipboard
Fix inconsistent base_url behavior in module client and OpenAIClient
Fixes #1373
Update base_url behavior to enforce trailing slash in module client
- Modify
src/openai/__init__.pyto enforce a trailing slash forbase_urlin the_ModuleClientclass. - Add a helper method
_enforce_trailing_slashto the_ModuleClientclass. - Update tests in
tests/test_module_client.pyto verify the consistent behavior ofbase_urlin both module client andOpenAIClient.
For more details, open the Copilot Workspace session.