Package com.morpheusdata.core.providers
Interface LlmProvider
- All Superinterfaces:
PluginProvider
Integration provider contract for LLM/LlmModel service integrations.
Plugins implement this interface to register an LlmModel integration type
under Admin > Integrations. Similar to
IPAMProvider, this creates
its own AccountIntegrationType and related
LlmIntegrationType during plugin load.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.morpheusdata.core.providers.PluginProvider
PluginProvider.ConfigurationDriftCheckFacet<T>, PluginProvider.EventSubscriberFacet<E extends Event>, PluginProvider.UpdateFacet<T> -
Method Summary
Modifier and TypeMethodDescriptiongenerateResponse(LlmIntegration languageModelIntegration, LlmChatRequest request, Map opts) Performs a non-streaming response generation request.default StringThe integration category used for routing and grouping.default BooleanIndicates whether the provider supports chat completions.default BooleanFlags if the user can create this integration type.default StringDescription for the provider-backed integration type.default BooleanIndicates whether the provider supports embedding generation.default BooleanFlags if this integration type is enabled.getIcon()Returns the integration logo for display.default List<OptionType>Provide custom configuration options when creating a new integration.default BooleanIndicates whether the provider supports streaming chat completions.voidrefresh(LlmIntegration languageModelIntegration) Called periodically to refresh and sync data from the provider.default voidstreamResponse(LlmIntegration languageModelIntegration, LlmChatRequest request, LlmStreamingResponseHandler handler, Map opts) Performs a streaming response generation request.default ServiceResponsevalidate(LlmIntegration languageModelIntegration, Map opts) Validation method used to validate inputs applied to the integration upon save.Methods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getMorpheus, getName, getPlugin
-
Method Details
-
getCategory
The integration category used for routing and grouping.- Returns:
- the category string
-
getIcon
Icon getIcon()Returns the integration logo for display.- Returns:
- Icon representation of assets stored in the plugin's src/assets
-
getOptionTypes
Provide custom configuration options when creating a new integration.- Returns:
- a List of OptionType
-
getCreatable
Flags if the user can create this integration type.- Returns:
- true if creatable; false otherwise
-
getDescription
Description for the provider-backed integration type.- Returns:
- integration description text
-
getEnabled
Flags if this integration type is enabled.- Returns:
- true if enabled
-
getChatSupported
Indicates whether the provider supports chat completions.- Returns:
- true if chat completion is supported
-
getStreamingChatSupported
Indicates whether the provider supports streaming chat completions.- Returns:
- true if streaming is supported
-
getEmbeddingSupported
Indicates whether the provider supports embedding generation.- Returns:
- true if embeddings are supported
-
validate
Validation method used to validate inputs applied to the integration upon save.- Parameters:
languageModelIntegration- the integration being validatedopts- custom payload options- Returns:
- a response indicating validity
-
refresh
Called periodically to refresh and sync data from the provider.- Parameters:
languageModelIntegration- the integration to refresh
-
generateResponse
ServiceResponse<LlmChatResponse> generateResponse(LlmIntegration languageModelIntegration, LlmChatRequest request, Map opts) Performs a non-streaming response generation request.- Parameters:
languageModelIntegration- integration configurationrequest- response generation request payloadopts- optional call options- Returns:
- response containing the generated output
-
streamResponse
default void streamResponse(LlmIntegration languageModelIntegration, LlmChatRequest request, LlmStreamingResponseHandler handler, Map opts) Performs a streaming response generation request.- Parameters:
languageModelIntegration- integration configurationrequest- response generation request payloadhandler- streaming callback handleropts- optional call options
-