The OpenAI Python library provides convenient access to the OpenAI REST API from any Python 3.7+ application. It includes type definitions for request params and response fields, supports both synchronous and asynchronous clients, and provides helper functions for streaming responses.
Table of contents
DocumentationInstallationUsageAsync usageStreaming responsesModule-level clientUsing typesPaginationNested paramsFile uploadsHandling errorsAdvancedMicrosoft Azure OpenAIVersioningRequirementsSort: