Package com.composum.ai.aem.core.impl
Class AemAIConfigurationPlugin
- java.lang.Object
-
- com.composum.ai.aem.core.impl.AemAIConfigurationPlugin
-
- All Implemented Interfaces:
com.composum.ai.backend.slingbase.AIConfigurationPlugin
public class AemAIConfigurationPlugin extends Object implements com.composum.ai.backend.slingbase.AIConfigurationPlugin
Implements AEM specific methods ofAIConfigurationPlugin
.
-
-
Field Summary
Fields Modifier and Type Field Description static List<String>
TEXT_ATTRIBS
Possible atttributes we use for the prompt text.static List<String>
TITLE_ATTRIBS
Possible attributes we use for the prompt name.
-
Constructor Summary
Constructors Constructor Description AemAIConfigurationPlugin()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Stream<org.apache.sling.api.resource.Resource>
descendantsStream(org.apache.sling.api.resource.Resource resource)
Returns a stream that goes through all descendants of a resource, parents come before their children.protected org.apache.sling.api.resource.Resource
determineLanguageResource(org.apache.sling.api.resource.Resource resource, String languageKey)
Map<String,String>
getGPTConfigurationMap(org.apache.sling.api.SlingHttpServletRequest request, String mapPath, String languageKey)
com.composum.ai.backend.slingbase.model.GPTPromptLibrary
getGPTPromptLibraryPathsDefault()
-
-
-
Method Detail
-
getGPTPromptLibraryPathsDefault
@Nullable public com.composum.ai.backend.slingbase.model.GPTPromptLibrary getGPTPromptLibraryPathsDefault()
- Specified by:
getGPTPromptLibraryPathsDefault
in interfacecom.composum.ai.backend.slingbase.AIConfigurationPlugin
-
getGPTConfigurationMap
@Nullable public Map<String,String> getGPTConfigurationMap(@Nonnull org.apache.sling.api.SlingHttpServletRequest request, @Nullable String mapPath, @Nullable String languageKey)
- Specified by:
getGPTConfigurationMap
in interfacecom.composum.ai.backend.slingbase.AIConfigurationPlugin
-
determineLanguageResource
protected org.apache.sling.api.resource.Resource determineLanguageResource(org.apache.sling.api.resource.Resource resource, String languageKey)
-
descendantsStream
@Nonnull public static Stream<org.apache.sling.api.resource.Resource> descendantsStream(@Nullable org.apache.sling.api.resource.Resource resource)
Returns a stream that goes through all descendants of a resource, parents come before their children.- Parameters:
resource
- a resource or null- Returns:
- a stream running through the resource and it's the descendants, not null
-
-