Class OpenAIOkHttpClient.Builder
- 
                    
                    - All Implemented Interfaces:
 
 public final class OpenAIOkHttpClient.BuilderA builder for OpenAIOkHttpClient. 
- 
                
                    
                    - 
                                
                            
                                Method Summary- 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        proxyfinal OpenAIOkHttpClient.Builder proxy(Proxy proxy) 
 - 
                                        proxyfinal OpenAIOkHttpClient.Builder proxy(Optional<Proxy> proxy) Alias for calling Builder.proxy with proxy.orElse(null).
 - 
                                        sslSocketFactoryfinal OpenAIOkHttpClient.Builder sslSocketFactory(SSLSocketFactory sslSocketFactory) The socket factory used to secure HTTPS connections. If this is set, then trustManager must also be set. If unset, then the system default is used. Most applications should not call this method, and instead use the system default. The default include special optimizations that can be lost if the implementation is modified. 
 - 
                                        sslSocketFactoryfinal OpenAIOkHttpClient.Builder sslSocketFactory(Optional<SSLSocketFactory> sslSocketFactory) Alias for calling Builder.sslSocketFactory with sslSocketFactory.orElse(null).
 - 
                                        trustManagerfinal OpenAIOkHttpClient.Builder trustManager(X509TrustManager trustManager) The trust manager used to secure HTTPS connections. If this is set, then sslSocketFactory must also be set. If unset, then the system default is used. Most applications should not call this method, and instead use the system default. The default include special optimizations that can be lost if the implementation is modified. 
 - 
                                        trustManagerfinal OpenAIOkHttpClient.Builder trustManager(Optional<X509TrustManager> trustManager) Alias for calling Builder.trustManager with trustManager.orElse(null).
 - 
                                        hostnameVerifierfinal OpenAIOkHttpClient.Builder hostnameVerifier(HostnameVerifier hostnameVerifier) The verifier used to confirm that response certificates apply to requested hostnames for HTTPS connections. If unset, then a default hostname verifier is used. 
 - 
                                        hostnameVerifierfinal OpenAIOkHttpClient.Builder hostnameVerifier(Optional<HostnameVerifier> hostnameVerifier) Alias for calling Builder.hostnameVerifier with hostnameVerifier.orElse(null).
 - 
                                        checkJacksonVersionCompatibilityfinal OpenAIOkHttpClient.Builder checkJacksonVersionCompatibility(Boolean checkJacksonVersionCompatibility) Whether to throw an exception if any of the Jackson versions detected at runtime are incompatible with the SDK's minimum supported Jackson version (2.13.4). Defaults to true. Use extreme caution when disabling this option. There is no guarantee that the SDK will work correctly when using an incompatible Jackson version. 
 - 
                                        jsonMapperfinal OpenAIOkHttpClient.Builder jsonMapper(JsonMapper jsonMapper) The Jackson JSON mapper to use for serializing and deserializing JSON. Defaults to com.openai.core.jsonMapper. The default is usually sufficient and rarely needs to be overridden. 
 - 
                                        streamHandlerExecutorfinal OpenAIOkHttpClient.Builder streamHandlerExecutor(Executor streamHandlerExecutor) The executor to use for running AsyncStreamResponse.Handler callbacks. Defaults to a dedicated cached thread pool. This class takes ownership of the executor and shuts it down, if possible, when closed. 
 - 
                                        sleeperfinal OpenAIOkHttpClient.Builder sleeper(Sleeper sleeper) The interface to use for delaying execution, like during retries. This is primarily useful for using fake delays in tests. Defaults to real execution delays. This class takes ownership of the sleeper and closes it when closed. 
 - 
                                        clockfinal OpenAIOkHttpClient.Builder clock(Clock clock) The clock to use for operations that require timing, like retries. This is primarily useful for using a fake clock in tests. Defaults to Clock.systemUTC. 
 - 
                                        baseUrlfinal OpenAIOkHttpClient.Builder baseUrl(String baseUrl) The base URL to use for every request. Defaults to the production environment: https://api.openai.com/v1.
 - 
                                        baseUrlfinal OpenAIOkHttpClient.Builder baseUrl(Optional<String> baseUrl) Alias for calling Builder.baseUrl with baseUrl.orElse(null).
 - 
                                        responseValidationfinal OpenAIOkHttpClient.Builder responseValidation(Boolean responseValidation) Whether to call validateon every response before returning it.Defaults to false, which means the shape of the response will not be validated upfront. Instead, validation will only occur for the parts of the response that are accessed. 
 - 
                                        timeoutfinal OpenAIOkHttpClient.Builder timeout(Timeout timeout) Sets the maximum time allowed for various parts of an HTTP call's lifecycle, excluding retries. Defaults to Timeout.default. 
 - 
                                        timeoutfinal OpenAIOkHttpClient.Builder timeout(Duration timeout) Sets the maximum time allowed for a complete HTTP call, not including retries. See Timeout.request for more details. For fine-grained control, pass a Timeout object. 
 - 
                                        maxRetriesfinal OpenAIOkHttpClient.Builder maxRetries(Integer maxRetries) The maximum number of times to retry failed requests, with a short exponential backoff between requests. Only the following error types are retried: - Connection errors (for example, due to a network connectivity problem) 
- 408 Request Timeout 
- 409 Conflict 
- 429 Rate Limit 
- 5xx Internal 
 The API may also explicitly instruct the SDK to retry or not retry a request. Defaults to 2. 
 - 
                                        apiKeyfinal OpenAIOkHttpClient.Builder apiKey(String apiKey) 
 - 
                                        credentialfinal OpenAIOkHttpClient.Builder credential(Credential credential) 
 - 
                                        azureServiceVersionfinal OpenAIOkHttpClient.Builder azureServiceVersion(AzureOpenAIServiceVersion azureServiceVersion) 
 - 
                                        azureUrlPathModefinal OpenAIOkHttpClient.Builder azureUrlPathMode(AzureUrlPathMode azureUrlPathMode) 
 - 
                                        organizationfinal OpenAIOkHttpClient.Builder organization(String organization) 
 - 
                                        organizationfinal OpenAIOkHttpClient.Builder organization(Optional<String> organization) Alias for calling Builder.organization with organization.orElse(null).
 - 
                                        projectfinal OpenAIOkHttpClient.Builder project(String project) 
 - 
                                        projectfinal OpenAIOkHttpClient.Builder project(Optional<String> project) Alias for calling Builder.project with project.orElse(null).
 - 
                                        webhookSecretfinal OpenAIOkHttpClient.Builder webhookSecret(String webhookSecret) 
 - 
                                        webhookSecretfinal OpenAIOkHttpClient.Builder webhookSecret(Optional<String> webhookSecret) Alias for calling Builder.webhookSecret with webhookSecret.orElse(null).
 - 
                                        headersfinal OpenAIOkHttpClient.Builder headers(Headers headers) 
 - 
                                        putHeaderfinal OpenAIOkHttpClient.Builder putHeader(String name, String value) 
 - 
                                        putHeadersfinal OpenAIOkHttpClient.Builder putHeaders(String name, Iterable<String> values) 
 - 
                                        putAllHeadersfinal OpenAIOkHttpClient.Builder putAllHeaders(Headers headers) 
 - 
                                        putAllHeadersfinal OpenAIOkHttpClient.Builder putAllHeaders(Map<String, Iterable<String>> headers) 
 - 
                                        replaceHeadersfinal OpenAIOkHttpClient.Builder replaceHeaders(String name, String value) 
 - 
                                        replaceHeadersfinal OpenAIOkHttpClient.Builder replaceHeaders(String name, Iterable<String> values) 
 - 
                                        replaceAllHeadersfinal OpenAIOkHttpClient.Builder replaceAllHeaders(Headers headers) 
 - 
                                        replaceAllHeadersfinal OpenAIOkHttpClient.Builder replaceAllHeaders(Map<String, Iterable<String>> headers) 
 - 
                                        removeHeadersfinal OpenAIOkHttpClient.Builder removeHeaders(String name) 
 - 
                                        removeAllHeadersfinal OpenAIOkHttpClient.Builder removeAllHeaders(Set<String> names) 
 - 
                                        queryParamsfinal OpenAIOkHttpClient.Builder queryParams(QueryParams queryParams) 
 - 
                                        queryParamsfinal OpenAIOkHttpClient.Builder queryParams(Map<String, Iterable<String>> queryParams) 
 - 
                                        putQueryParamfinal OpenAIOkHttpClient.Builder putQueryParam(String key, String value) 
 - 
                                        putQueryParamsfinal OpenAIOkHttpClient.Builder putQueryParams(String key, Iterable<String> values) 
 - 
                                        putAllQueryParamsfinal OpenAIOkHttpClient.Builder putAllQueryParams(QueryParams queryParams) 
 - 
                                        putAllQueryParamsfinal OpenAIOkHttpClient.Builder putAllQueryParams(Map<String, Iterable<String>> queryParams) 
 - 
                                        replaceQueryParamsfinal OpenAIOkHttpClient.Builder replaceQueryParams(String key, String value) 
 - 
                                        replaceQueryParamsfinal OpenAIOkHttpClient.Builder replaceQueryParams(String key, Iterable<String> values) 
 - 
                                        replaceAllQueryParamsfinal OpenAIOkHttpClient.Builder replaceAllQueryParams(QueryParams queryParams) 
 - 
                                        replaceAllQueryParamsfinal OpenAIOkHttpClient.Builder replaceAllQueryParams(Map<String, Iterable<String>> queryParams) 
 - 
                                        removeQueryParamsfinal OpenAIOkHttpClient.Builder removeQueryParams(String key) 
 - 
                                        removeAllQueryParamsfinal OpenAIOkHttpClient.Builder removeAllQueryParams(Set<String> keys) 
 - 
                                        fromEnvfinal OpenAIOkHttpClient.Builder fromEnv() Updates configuration using system properties and environment variables. 
 - 
                                        buildfinal OpenAIClient build() Returns an immutable instance of OpenAIClient. Further updates to this Builder will not mutate the returned instance. 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-