Class CustomOktaAIProvider

All Implemented Interfaces:
ExtensionPoint, Describable<BaseAIProvider>

public class CustomOktaAIProvider extends BaseAIProvider
Generic provider for OpenAI-style chat completion APIs secured by Okta OAuth client credentials.
  • Field Details

  • Constructor Details

    • CustomOktaAIProvider

      @DataBoundConstructor public CustomOktaAIProvider(String url, String tokenUrl, String model, String clientId, Secret clientSecret)
  • Method Details

    • getTokenUrl

      public String getTokenUrl()
    • getApiVersion

      public String getApiVersion()
    • setApiVersion

      @DataBoundSetter public void setApiVersion(String apiVersion)
    • getClientId

      public String getClientId()
    • getClientSecret

      public Secret getClientSecret()
    • getScope

      public String getScope()
    • setScope

      @DataBoundSetter public void setScope(String scope)
    • getAccessTokenHeader

      public String getAccessTokenHeader()
    • setAccessTokenHeader

      @DataBoundSetter public void setAccessTokenHeader(String accessTokenHeader)
    • getAccessTokenPrefix

      public String getAccessTokenPrefix()
    • setAccessTokenPrefix

      @DataBoundSetter public void setAccessTokenPrefix(String accessTokenPrefix)
    • getAppKey

      public Secret getAppKey()
    • setAppKey

      @DataBoundSetter public void setAppKey(Secret appKey)
    • getUserId

      public String getUserId()
    • setUserId

      @DataBoundSetter public void setUserId(String userId)
    • getTimeoutSeconds

      public Integer getTimeoutSeconds()
    • setTimeoutSeconds

      @DataBoundSetter public void setTimeoutSeconds(Integer timeoutSeconds)
    • createAssistant

      public BaseAIProvider.Assistant createAssistant(@CheckForNull Item item, @CheckForNull org.springframework.security.core.Authentication authentication, @CheckForNull Double temperature)
      Description copied from class: BaseAIProvider
      The single assistant factory providers implement. It receives the full request context — credentials scope and temperature — so that a provider cannot accidentally drop a parameter by overriding the wrong overload (the narrower createAssistant variants are final and delegate here). Providers without item-scoped credentials simply ignore item/authentication.
      Specified by:
      createAssistant in class BaseAIProvider
      Parameters:
      item - the item defining the credentials scope, or null
      authentication - the authentication for credentials lookup, or null
      temperature - the temperature to use, or null for the provider default
      Returns:
      the assistant
    • createFixAssistant

      public FixAssistant createFixAssistant(@CheckForNull Item item, @CheckForNull org.springframework.security.core.Authentication authentication)
      Description copied from class: BaseAIProvider
      The single fix-assistant factory providers implement; the no-arg createFixAssistant() is final and delegates here.
      Specified by:
      createFixAssistant in class BaseAIProvider
      Parameters:
      item - the item defining the credentials scope, or null
      authentication - the authentication for credentials lookup, or null
      Returns:
      the fix assistant
    • isNotValid

      public boolean isNotValid(@CheckForNull TaskListener listener)
      Specified by:
      isNotValid in class BaseAIProvider