Interface SdkAuth

  • All Known Implementing Classes:
    FromDeveloper, FromEnvironment, FromJson
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface SdkAuth
    This interface provider an instance of ApiCredentials
    It can have multiple implementations according to the way the api key is provided to the application
    As easy for implementation it is, this library provides the following default implementation for immediate usage: As this is a FunctionalInterface it can also be implemented as a lambda (supplier) in the notation of
    () -> new ApiCredentials(..
     .)
    • Method Detail

      • credentials

        bg.codexio.ai.openai.api.payload.credentials.ApiCredentials credentials()
        Returns:
        ApiCredentials
        Throws:
        NotValidAuthenticationMethod - if the API Key is not found as it is an integral part of the authentication