Package io.forgeai.jenkins.llm
Class LLMProvider
java.lang.Object
io.forgeai.jenkins.llm.LLMProvider
- All Implemented Interfaces:
ExtensionPoint,Describable<LLMProvider>,Serializable
- Direct Known Subclasses:
AnthropicProvider,OllamaProvider,OpenAICompatibleProvider
public abstract class LLMProvider
extends Object
implements ExtensionPoint, Describable<LLMProvider>, Serializable
Extension point for LLM backends. Implement this interface (plus a Descriptor) to add a new
provider — even from a separate plugin — without modifying ForgeAI itself.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionall()abstract StringintHow many analyzer requests this provider handles well at once, used when the global "Parallel LLM requests" setting is left at 0 (automatic).abstract Stringabstract booleanprotected static okhttp3.OkHttpClienthttpClient(long connectTimeoutSeconds, long readTimeoutSeconds) Builds an HTTP client that honours the Jenkins proxy settings (Manage Jenkins → System → HTTP Proxy Configuration), including no-proxy hosts and proxy credentials.protected StringvoidvoidvoidsetModelId(String v)
-
Field Details
-
endpoint
-
modelId
-
-
Constructor Details
-
LLMProvider
public LLMProvider()
-
-
Method Details
-
complete
public abstract String complete(String systemPrompt, String userPrompt, int maxTokens) throws LLMException - Throws:
LLMException
-
healthCheck
public abstract boolean healthCheck() -
displayName
-
defaultParallelism
public int defaultParallelism()How many analyzer requests this provider handles well at once, used when the global "Parallel LLM requests" setting is left at 0 (automatic). -
httpClient
protected static okhttp3.OkHttpClient httpClient(long connectTimeoutSeconds, long readTimeoutSeconds) Builds an HTTP client that honours the Jenkins proxy settings (Manage Jenkins → System → HTTP Proxy Configuration), including no-proxy hosts and proxy credentials. -
getEndpoint
-
setEndpoint
-
getModelId
-
setModelId
-
getApiKeyCredentialId
-
setApiKeyCredentialId
-
resolveApiKey
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<LLMProvider>
-
all
-