Configuration
General Configuration
Parser config
Guardlight allows for extra parsers to be added to extend it's parsing functionality.
Adding more parsers can be done via the parsers
config section with the following config.
When adding parsers via the config, the parsers will also become available for selecting in the UI.
Config Explanation
type
The type and also the topic name for this parser.
name
Name for the parser show in the UI.
description
Description show in the UI.
external
If the container managed by something else than Guardlight. If false, then Guardlight will manage the Container lifecycle. If true, Guardlight assumes that the container is already running and listening on the specific nats topic.
Configuration
parsers:
- type: epub
name: EPUB Parses
description: Parses epub files to utf-8 standard text
external: false
The text
and result
parser topic names are reserved and cannot be used or overridden.
Analyzer config
Guardlight allows for extra parsers to be added to extend it's parsing functionality.
Adding more analyzers can be done via the analyzers
config section with the following config.
When adding analyzers via the config, the analyzers will also become available for selecting in the UI.
Config Explanation
key
The key and also the topic name for this analyzer.
name
Name for the analyzer show in the UI.
description
Description show in the UI.
context_window
The content/text size that will be given to the analyzer for analysis.
model
The model that is used when chunking text. Ensures that the correct context_window length is used for chunking. 'text' is for non-AI models.
inputs
List of objects for defining the input the analyzer requires from the User. This is an extension of the base analyzer input contract.
output
An object that the analyzer will give back to the server. This is an extension of the base analyzer result contract.
concurrency
The max amount of analyzers that can be scheduled.
external
If the container managed by something else than Guardlight. If false, then Guardlight will manage the Container lifecycle. If true, Guardlight assumes that the container is already running and listening on the specific nats topic.
Input Config Explanation
key
Unique name for input
name
Name of the input which will be the heading in the UI.
description
A useful description show under the heading in the UI
type
The input required from the user. Can be textarea, textfield.
Configuration
Below is an example of the default analyzer config
analyzers:
- key: word_search
name: Word Search Analyzer
description: Uses a basic word list to scan content for.
context_window: 16000
model: text
concurrency: 4
external: false
inputs:
- key: strict_words
name: Strict Words
description: Words in this list will immediatly flag the content.
type: textarea
- key: sentiment_analysis
name: Sentiment Analyzer
description: Uses the predefined word or phrase list to determine the sentiment of each word/phrase
context_window: 8000
model: text
concurrency: 4
external: false
inputs:
- key: contextual_words
name: Contextual Words
description: These words/phrases will be used to scan the text and a score (between -1 and 1) will be determined for each.
type: textarea
data: string # Mandatory required field
The result
analyzer topic name are reserved and cannot be used or overridden.
Environment Variables
All config properties can be overridden by environment variables
Each property can be overridden by using the prefix GUARDLIGHT_
and the property with each indentation as a .
.
For example: Changing the Data Content Size: GUARDLIGHT_DATA_CONTENT_SIZE=200
Last updated