This commit is contained in:
Cohee 2023-06-07 18:15:50 +03:00 committed by maver
parent 41366b0e72
commit cb60c31490

View File

@ -369,6 +369,11 @@ PromptManagerModule.prototype.sanitizeServiceSettings = function () {
// Check whether the referenced prompts are present.
if (0 === this.serviceSettings.prompts.length) this.setPrompts(openAiDefaultPrompts.prompts);
// Check whether the prompt manager settings are present.
if (this.serviceSettings.prompt_manager_settings === undefined) {
this.serviceSettings.prompt_manager_settings = Object.assign({}, defaultPromptManagerSettings);
}
this.serviceSettings.prompts.forEach((prompt => prompt && (prompt.identifier = prompt.identifier || this.getUuidv4())));
// TODO:
// Sanitize data