python client 0.11.0#42
Merged
Merged
Conversation
- Add `.isort.cfg` and fix imports to match. - Exit with status 1 instead of 0 on error in `openai`. - Support `openai.api_key_path` variable to make it easy to have long-running processes with auto-updated keys. - Drop support for unverified SSL connections. - Substantially simplify HTTP client code. Now that we use `requests` for everything, we do not need distinct `HTTPClient` and `APIRequestor` abstractions, and we can use the `requests` implementation for multipart data, rather than our own. - Drop vestigial code originally from the Stripe client. For example, there was a bunch of code related to an idempotency framework; OpenAI does not have an idempotency framework. - Drop support for `APIResource.delete` as an instance method; it is just a class method now. - Drop support for `APIResource.save`; use `APIResource.modify` instead. This substantially simplifies API resources, since they no longer need to track changed fields, and there's less risk of race conditions. And the only thing it could be used for is changing the number of replicas an engine had, which does not justify the complexity of the code. - Drop the request-metrics code. It is unused.
hallacy
approved these changes
Oct 26, 2021
Closed
cgayapr
pushed a commit
to cgayapr/openai-python
that referenced
this pull request
Dec 14, 2024
- Add `.isort.cfg` and fix imports to match. - Exit with status 1 instead of 0 on error in `openai`. - Support `openai.api_key_path` variable to make it easy to have long-running processes with auto-updated keys. - Drop support for unverified SSL connections. - Substantially simplify HTTP client code. Now that we use `requests` for everything, we do not need distinct `HTTPClient` and `APIRequestor` abstractions, and we can use the `requests` implementation for multipart data, rather than our own. - Drop vestigial code originally from the Stripe client. For example, there was a bunch of code related to an idempotency framework; OpenAI does not have an idempotency framework. - Drop support for `APIResource.delete` as an instance method; it is just a class method now. - Drop support for `APIResource.save`; use `APIResource.modify` instead. This substantially simplifies API resources, since they no longer need to track changed fields, and there's less risk of race conditions. And the only thing it could be used for is changing the number of replicas an engine had, which does not justify the complexity of the code. - Drop the request-metrics code. It is unused.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
.isort.cfgand fix imports to match.openai.openai.api_key_pathvariable to make it easy to have long-running processes with auto-updated keys.requestsfor everything, we do not need distinctHTTPClientandAPIRequestorabstractions, and we can use therequestsimplementation for multipart data, rather than our own.APIResource.deleteas an instance method; it is just a class method now.APIResource.save; useAPIResource.modifyinstead. This substantially simplifies API resources, since they no longer need to track changed fields, and there's less risk of race conditions. And the only thing it could be used for is changing the number of replicas an engine had, which does not justify the complexity of the code.