Class AiToolKernelSettings
java.lang.Object
com.kingsrook.qqq.backend.core.actions.ai.AiToolKernelSettings
- All Implemented Interfaces:
MetaDataProducerOutput,QMetaDataObject,QSupplementalInstanceMetaData,TopLevelMetaDataInterface,Serializable
Settings for an
AiToolKernel.
maxRowsToModel - the most rows any tool sends to the model (a server cap -
a larger requested limit is reduced to this).
maxCellChars - longer string values are truncated (after redaction).
defaultExposure - the exposure of tables and fields that have no explicit
AiTableMetaData / AiFieldMetaData and no more restrictive
default (e.g., METADATA_ONLY for a high-sensitivity deployment).
customRedactionPatterns - additional patterns the redactor replaces with
[REDACTED:custom], on top of its built-in secret and PII patterns.
allowedWidgetNames - the widgets the assistant may render (render_widget)
or mention (digests, search_help): widgets are default-DENY, because a
widget renderer may read data without the user's table permissions (e.g.,
as a system user) - so only widgets an app developer has reviewed and
listed here are used. (QQQ widget meta-data has no supplemental meta-data
hook, so the opt-in lives in these settings.)
hiddenWidgetNames - widgets never rendered, even if allowed (an override deny).- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for allowedWidgetNamesGetter for customRedactionPatternsGetter for dataGateway (null means the core actions)Getter for defaultExposureGetter for hiddenWidgetNamesGetter for maxCellCharsGetter for maxRowsToModelgetName()Supplemental metadata name.booleanisWidgetAllowed(String widgetName) Whether the assistant may use a widget: it is allowed, and not hidden.static AiToolKernelSettingsInstance settings for assistant-channel requests outside a kernel call.voidsetAllowedWidgetNames(Set<String> allowedWidgetNames) Setter for allowedWidgetNamesvoidsetCustomRedactionPatterns(List<Pattern> customRedactionPatterns) Setter for customRedactionPatternsvoidsetDataGateway(AiDataGateway dataGateway) Setter for dataGatewayvoidsetDefaultExposure(AiExposure defaultExposure) Setter for defaultExposurevoidsetHiddenWidgetNames(Set<String> hiddenWidgetNames) Setter for hiddenWidgetNamesvoidsetMaxCellChars(Integer maxCellChars) Setter for maxCellCharsvoidsetMaxRowsToModel(Integer maxRowsToModel) Setter for maxRowsToModelwithAllowedWidgetName(String widgetName) Fluent method to allow one widget (opt it in to the assistant).withAllowedWidgetNames(Set<String> allowedWidgetNames) Fluent setter for allowedWidgetNameswithCustomRedactionPattern(Pattern pattern) Fluent method to add one custom redaction pattern.withCustomRedactionPatterns(List<Pattern> customRedactionPatterns) Fluent setter for customRedactionPatternswithDataGateway(AiDataGateway dataGateway) Fluent setter for dataGateway: how the data tools read data (e.g. the UI API gateway, so every read is a /qqq/v1 operation as the user).withDefaultExposure(AiExposure defaultExposure) Fluent setter for defaultExposurewithHiddenWidgetName(String widgetName) Fluent method to add one hidden widget name.withHiddenWidgetNames(Set<String> hiddenWidgetNames) Fluent setter for hiddenWidgetNameswithMaxCellChars(Integer maxCellChars) Fluent setter for maxCellCharswithMaxRowsToModel(Integer maxRowsToModel) Fluent setter for maxRowsToModelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.kingsrook.qqq.backend.core.model.metadata.QSupplementalInstanceMetaData
addSelfToInstance, enrich, validate
-
Field Details
-
NAME
- See Also:
-
DEFAULT_MAX_ROWS_TO_MODEL
public static final int DEFAULT_MAX_ROWS_TO_MODEL- See Also:
-
DEFAULT_MAX_CELL_CHARS
public static final int DEFAULT_MAX_CELL_CHARS- See Also:
-
-
Constructor Details
-
AiToolKernelSettings
public AiToolKernelSettings()
-
-
Method Details
-
of
Instance settings for assistant-channel requests outside a kernel call. -
getName
Supplemental metadata name.- Specified by:
getNamein interfaceTopLevelMetaDataInterface
-
withCustomRedactionPattern
Fluent method to add one custom redaction pattern. -
withAllowedWidgetName
Fluent method to allow one widget (opt it in to the assistant). -
isWidgetAllowed
Whether the assistant may use a widget: it is allowed, and not hidden. -
withHiddenWidgetName
Fluent method to add one hidden widget name. -
getMaxRowsToModel
Getter for maxRowsToModel -
setMaxRowsToModel
Setter for maxRowsToModel -
withMaxRowsToModel
Fluent setter for maxRowsToModel -
getMaxCellChars
Getter for maxCellChars -
setMaxCellChars
Setter for maxCellChars -
withMaxCellChars
Fluent setter for maxCellChars -
getDefaultExposure
Getter for defaultExposure -
setDefaultExposure
Setter for defaultExposure -
withDefaultExposure
Fluent setter for defaultExposure -
getCustomRedactionPatterns
-
setCustomRedactionPatterns
-
withCustomRedactionPatterns
Fluent setter for customRedactionPatterns -
getHiddenWidgetNames
-
setHiddenWidgetNames
-
withHiddenWidgetNames
Fluent setter for hiddenWidgetNames -
getAllowedWidgetNames
-
setAllowedWidgetNames
-
withAllowedWidgetNames
Fluent setter for allowedWidgetNames -
getDataGateway
Getter for dataGateway (null means the core actions) -
setDataGateway
Setter for dataGateway -
withDataGateway
Fluent setter for dataGateway: how the data tools read data (e.g. the UI API gateway, so every read is a /qqq/v1 operation as the user).
-