Package com.openai.credential
See: Description
-
Class Summary Class Description BearerTokenCredential <p> A credential that provides a bearer token. </p><p> If you are using the OpenAI API, you need to provide a bearer token for authentication. All API requests should include your API key in an Authorization HTTP header as follows: "Authorization: Bearer OPENAI_API_KEY" </p><p> Two ways to provide the token: </p> <ol> <l1> 1. Provide the token directly, 'BearerTokenCredential.create(String)'. The method 'ClientOptions.apiKey(String)' is a wrapper for this.</li> <l1> 2. Provide a supplier that provides the token, 'BearerTokenCredential.create(Supplier<String>)'.</li> </ol> -
Interface Summary Interface Description Credential An interface that represents a credential.