Class AnthropicProvider
java.lang.Object
hudson.model.AbstractDescribableImpl<BaseAIProvider>
io.jenkins.plugins.explain_error.provider.BaseAIProvider
io.jenkins.plugins.explain_error.provider.ChatModelAIProvider
io.jenkins.plugins.explain_error.provider.AnthropicProvider
- All Implemented Interfaces:
ExtensionPoint,Describable<BaseAIProvider>
-
Nested Class Summary
Nested ClassesNested 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
FieldsModifier and TypeFieldDescriptionprotected Secretprotected Stringstatic final intstatic final Stringprotected IntegerFields inherited from class io.jenkins.plugins.explain_error.provider.BaseAIProvider
model, SYSTEM_PROMPT, url, USER_PROMPT_TEMPLATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected dev.langchain4j.model.chat.ChatModelcreateChatModel(Item item, org.springframework.security.core.Authentication authentication, Double temperature) Creates the chat model for one request.The endpoint URL this provider would call, used only to run connection diagnostics when a configuration test fails.booleanisNotValid(TaskListener listener) booleanisNotValid(TaskListener listener, Item item, org.springframework.security.core.Authentication authentication) Methods inherited from class io.jenkins.plugins.explain_error.provider.ChatModelAIProvider
createAssistant, createFixAssistantMethods inherited from class io.jenkins.plugins.explain_error.provider.BaseAIProvider
analyzeError, buildSystemPrompt, buildUserPrompt, createAssistant, createAssistant, createAssistant, createFixAssistant, explainError, explainError, explainError, explainError, explainError, getDescriptor, getModel, getProviderName, getProxyAuthorizationHeader, getUrl, newJenkinsHttpClientBuilder, newLangChainHttpClientBuilder
-
Field Details
-
DEFAULT_MODEL
- See Also:
-
DEFAULT_MAX_TOKENS
public static final int DEFAULT_MAX_TOKENS- See Also:
-
apiKey
-
credentialsId
-
maxTokens
-
-
Constructor Details
-
AnthropicProvider
-
-
Method Details
-
getApiKey
-
getCredentialsId
-
getMaxTokens
-
createChatModel
protected dev.langchain4j.model.chat.ChatModel createChatModel(@CheckForNull Item item, @CheckForNull org.springframework.security.core.Authentication authentication, @CheckForNull Double temperature) Description copied from class:ChatModelAIProviderCreates the chat model for one request.- Specified by:
createChatModelin classChatModelAIProvider- 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 configured chat model
-
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
-
getEffectiveEndpointForDiagnostics
Description copied from class:BaseAIProviderThe endpoint URL this provider would call, used only to run connection diagnostics when a configuration test fails. Providers with a fixed or derivable default endpoint should override this to return it when no explicit URL is configured.- Overrides:
getEffectiveEndpointForDiagnosticsin classBaseAIProvider- Returns:
- the effective endpoint URL, or
nullwhen unknown
-