Class BaseAIProvider
java.lang.Object
hudson.model.AbstractDescribableImpl<BaseAIProvider>
io.jenkins.plugins.explain_error.provider.BaseAIProvider
- All Implemented Interfaces:
ExtensionPoint,Describable<BaseAIProvider>
- Direct Known Subclasses:
GeminiProvider,OllamaProvider,OpenAIProvider
public abstract class BaseAIProvider
extends AbstractDescribableImpl<BaseAIProvider>
implements ExtensionPoint
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic classNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract BaseAIProvider.Assistantfinal StringexplainError(String errorLogs, TaskListener listener) Explain error logs using the configured AI provider.final StringexplainError(String errorLogs, TaskListener listener, String language) Explain error logs using the configured AI provider.getModel()getUrl()abstract booleanisNotValid(TaskListener listener)
-
Field Details
-
url
-
model
-
-
Constructor Details
-
BaseAIProvider
-
-
Method Details
-
createAssistant
-
isNotValid
-
getUrl
-
getModel
-
explainError
public final String explainError(String errorLogs, TaskListener listener) throws ExplanationException Explain error logs using the configured AI provider.- Parameters:
errorLogs- the error logs to explain- Returns:
- the AI explanation
- Throws:
ExplanationException- if there's a communication error
-
explainError
public final String explainError(String errorLogs, TaskListener listener, String language) throws ExplanationException Explain error logs using the configured AI provider.- Parameters:
errorLogs- the error logs to explainlanguage- the preferred response language- Returns:
- the AI explanation
- Throws:
ExplanationException- if there's a communication error
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<BaseAIProvider>- Overrides:
getDescriptorin classAbstractDescribableImpl<BaseAIProvider>
-
getProviderName
-