Class AzureOpenAIProvider
java.lang.Object
hudson.model.AbstractDescribableImpl<BaseAIProvider>
io.jenkins.plugins.explain_error.provider.BaseAIProvider
io.jenkins.plugins.explain_error.provider.AzureOpenAIProvider
- All Implemented Interfaces:
ExtensionPoint,Describable<BaseAIProvider>
Azure OpenAI provider backed by Jenkins StringCredentials.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe Azure OpenAI API type to use for requests.static classNested classes/interfaces inherited from class io.jenkins.plugins.explain_error.provider.BaseAIProvider
BaseAIProvider.Assistant, BaseAIProvider.BaseProviderDescriptorNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsFields inherited from class io.jenkins.plugins.explain_error.provider.BaseAIProvider
model, SYSTEM_PROMPT, url, USER_PROMPT_TEMPLATE -
Constructor Summary
ConstructorsConstructorDescriptionAzureOpenAIProvider(String endpoint, String deployment, String apiVersion, String credentialsId, AzureOpenAIProvider.ApiType apiType) -
Method Summary
Modifier and TypeMethodDescriptioncreateAssistant(Item item, org.springframework.security.core.Authentication authentication, Double temperature) The single assistant factory providers implement.createFixAssistant(Item item, org.springframework.security.core.Authentication authentication) The single fix-assistant factory providers implement; the no-argcreateFixAssistant()is final and delegates here.booleanisNotValid(TaskListener listener) booleanisNotValid(TaskListener listener, Item item, org.springframework.security.core.Authentication authentication) Methods inherited from class io.jenkins.plugins.explain_error.provider.BaseAIProvider
analyzeError, buildSystemPrompt, buildUserPrompt, createAssistant, createAssistant, createAssistant, createFixAssistant, explainError, explainError, explainError, explainError, explainError, getDescriptor, getEffectiveEndpointForDiagnostics, getModel, getProviderName, getProxyAuthorizationHeader, getUrl, newJenkinsHttpClientBuilder, newLangChainHttpClientBuilder
-
Field Details
-
DEFAULT_DEPLOYMENT
- See Also:
-
DEFAULT_API_VERSION
- See Also:
-
DEFAULT_TIMEOUT_SECONDS
public static final int DEFAULT_TIMEOUT_SECONDS- See Also:
-
-
Constructor Details
-
AzureOpenAIProvider
@DataBoundConstructor public AzureOpenAIProvider(String endpoint, String deployment, String apiVersion, String credentialsId, AzureOpenAIProvider.ApiType apiType)
-
-
Method Details
-
getEndpoint
-
getDeployment
-
getApiVersion
-
getCredentialsId
-
getApiType
-
createAssistant
public BaseAIProvider.Assistant createAssistant(@CheckForNull Item item, @CheckForNull org.springframework.security.core.Authentication authentication, @CheckForNull Double temperature) Description copied from class:BaseAIProviderThe 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 narrowercreateAssistantvariants are final and delegate here). Providers without item-scoped credentials simply ignoreitem/authentication.- Specified by:
createAssistantin classBaseAIProvider- Parameters:
item- the item defining the credentials scope, ornullauthentication- the authentication for credentials lookup, ornulltemperature- the temperature to use, ornullfor the provider default- Returns:
- the assistant
-
createFixAssistant
public FixAssistant createFixAssistant(@CheckForNull Item item, @CheckForNull org.springframework.security.core.Authentication authentication) Description copied from class:BaseAIProviderThe single fix-assistant factory providers implement; the no-argcreateFixAssistant()is final and delegates here.- Specified by:
createFixAssistantin classBaseAIProvider- Parameters:
item- the item defining the credentials scope, ornullauthentication- the authentication for credentials lookup, ornull- Returns:
- the fix assistant
-
isNotValid
- Specified by:
isNotValidin classBaseAIProvider
-
isNotValid
public boolean isNotValid(@CheckForNull TaskListener listener, @CheckForNull Item item, @CheckForNull org.springframework.security.core.Authentication authentication) - Overrides:
isNotValidin classBaseAIProvider
-