Package atessera.sensei
Class SenseiConfig
java.lang.Object
atessera.sensei.SenseiConfig
Global configuration of the laboratory checking system.
The configuration can be supplied as a JSON file through
load(Path). Values that are not present in the JSON keep their
field initializers, so a configuration file may specify only the parts
it needs to override.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classParameters for a single LLM endpoint.static final classSMTP related settings. -
Field Summary
FieldsModifier and TypeFieldDescriptionList of laboratory works which can be assigned to studentsSMTP settings used for sending result e-mails.LLM parameters used for technical tasks: directory selection, scoring, run command detection.LLM parameters used for composing review responses to students (the sensei persona). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether at least one LLM is configured and available.booleanhasSmtp()Checks whether SMTP settings look sufficient for sending mail.booleanChecks whether the tech LLM is configured and has an API key.booleanChecks whether the writer LLM is configured and has an API key.static SenseiConfigLoads the configuration from a JSON file.voidWrites the configuration to a JSON file.
-
Field Details
-
writerLlm
LLM parameters used for composing review responses to students (the sensei persona). -
techLlm
LLM parameters used for technical tasks: directory selection, scoring, run command detection. -
smtp
SMTP settings used for sending result e-mails. -
labWorks
List of laboratory works which can be assigned to students
-
-
Constructor Details
-
SenseiConfig
public SenseiConfig()
-
-
Method Details
-
load
Loads the configuration from a JSON file.- Parameters:
path- path to the JSON configuration file; must not benull- Returns:
- the loaded configuration
- Throws:
IOException- if the file cannot be read
-
save
Writes the configuration to a JSON file.Parent directories are created when necessary.
- Parameters:
path- target file path; must not benull- Throws:
IOException- when the file cannot be written
-
hasWriterLlm
public boolean hasWriterLlm()Checks whether the writer LLM is configured and has an API key.- Returns:
truewhen writer LLM can be used
-
hasTechLlm
public boolean hasTechLlm()Checks whether the tech LLM is configured and has an API key.- Returns:
truewhen tech LLM can be used
-
hasAnyLlm
public boolean hasAnyLlm()Checks whether at least one LLM is configured and available.- Returns:
truewhen any LLM-based checks can be performed
-
hasSmtp
public boolean hasSmtp()Checks whether SMTP settings look sufficient for sending mail.- Returns:
truewhen SMTP host and sender are configured
-