feat: add a global prompt #4451
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Type
Relevant Issues
resolves #3906
What is in this change?
#3906
short description
adds default system prompt (locale dependent + all locale translations of previous default system prompt) + general (global) configurable system prompt for ALL workspaces (admin or manager may configure general system prompt instead of default one which will be used by default in all workspaces)
I tested the code on local machine + tested docker-compose version new changes work as planned
More specifically added:
Additional Information
about me (just in case)
new things
system_settings:"general_system_prompt"and"default_system_prompt"customization.items.system-prompt.default+ title and descriptionimportant changes:
chatPromptfunction (from index.js to systemPromptHelper.js) because of cyclic dependency (couldn't import SystemSettings.js to index.js)(unfortunately I found no other way because locale is located on frontend part, the only way to have locale dependent
default system prompt is to synchronise frontend and server, so
I decided to store it in DB in
system_settingsasdefault_system_promptand change on language changebuildSystemPromptin convertTo.js (now async)Developer Validations
yarn lintfrom the root of the repo & committed changes