Merge branch 'staging' of https://github.com/SillyTavern/SillyTavern into staging

This commit is contained in:
Cohee 2023-09-13 13:21:47 +03:00
commit c60d4e5bb9
2 changed files with 14 additions and 0 deletions

1
.gitignore vendored
View File

@ -26,6 +26,7 @@ public/settings.json
/thumbnails
whitelist.txt
.vscode
.idea/
secrets.json
/dist
/backups/

View File

@ -636,6 +636,11 @@ function populateChatCompletion(prompts, chatCompletion, { bias, quietPrompt, ty
chatCompletion.insert(vectorsMemory, 'main');
}
// Smart Context (ChromaDB)
if (prompts.has('smartContext')) {
chatCompletion.insert(Message.fromPrompt(prompts.get('smartContext')), 'main');
}
// Decide whether dialogue examples should always be added
if (power_user.pin_examples) {
populateDialogueExamples(prompts, chatCompletion);
@ -711,6 +716,14 @@ function preparePromptsForChatCompletion({Scenario, charPersonality, name2, worl
identifier: 'vectorsMemory',
});
// Smart Context (ChromaDB)
const smartContext = extensionPrompts['chromadb'];
if (smartContext && smartContext.value) systemPrompts.push({
role: 'system',
content: smartContext.value,
identifier: 'smartContext'
});
// Persona Description
if (power_user.persona_description && power_user.persona_description_position === persona_description_positions.IN_PROMPT) {
systemPrompts.push({ role: 'system', content: power_user.persona_description, identifier: 'personaDescription' });