Class OpenAiProviderConfig
java.lang.Object
hudson.model.AbstractDescribableImpl<AiProviderConfig>
io.jenkins.plugins.changeinvestigator.ai.provider.AiProviderConfig
io.jenkins.plugins.changeinvestigator.ai.provider.OpenAiProviderConfig
- All Implemented Interfaces:
Describable<AiProviderConfig>,Serializable
OpenAI itself. Deliberately minimal - just a model and a credential - with the API base URL
defaulted internally to
https://api.openai.com/v1 rather than asked of every user, on
the theory that someone choosing "OpenAI" from the provider dropdown almost always means the
real OpenAI API. An advanced override is still available for edge cases (a private OpenAI
network endpoint, a regional routing layer, etc.) without cluttering the common path.- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class io.jenkins.plugins.changeinvestigator.ai.provider.AiProviderConfig
AiProviderConfig.AiProviderConfigDescriptor -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper, int timeoutSeconds) Builds a provider bound to this configuration's resolved settings, ready to make one (or more)AiProvider.chatCompletion(io.jenkins.plugins.changeinvestigator.ai.AiAnalysisRequest)calls.getModel()The model identifier this configuration will request, for display purposes.voidsetBaseUrl(String baseUrl) Methods inherited from class io.jenkins.plugins.changeinvestigator.ai.provider.AiProviderConfig
testConnectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.Describable
getDescriptor
-
Field Details
-
DEFAULT_BASE_URL
- See Also:
-
DEFAULT_MODEL
- See Also:
-
-
Constructor Details
-
OpenAiProviderConfig
-
-
Method Details
-
getModel
Description copied from class:AiProviderConfigThe model identifier this configuration will request, for display purposes.- Specified by:
getModelin classAiProviderConfig
-
getCredentialsId
-
getBaseUrl
-
setBaseUrl
-
createProvider
public AiProvider createProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper, int timeoutSeconds) Description copied from class:AiProviderConfigBuilds a provider bound to this configuration's resolved settings, ready to make one (or more)AiProvider.chatCompletion(io.jenkins.plugins.changeinvestigator.ai.AiAnalysisRequest)calls. Resolving the credential happens inside this method, not before it, so the plaintext secret's lifetime is limited to the call that actually needs it.- Specified by:
createProviderin classAiProviderConfig- Parameters:
objectMapper- shared Jackson mapper for building/parsing request and response JSONtimeoutSeconds- administrator-configured connect/request timeout (a global, not per-provider, setting - seeChangeInvestigatorGlobalConfiguration)
-