mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Implement Data Bank vectors querying
This commit is contained in:
@ -998,6 +998,15 @@ async function populateChatCompletion(prompts, chatCompletion, { bias, quietProm
|
||||
}
|
||||
}
|
||||
|
||||
// Vectors Data Bank
|
||||
if (prompts.has('vectorsDataBank')) {
|
||||
const vectorsDataBank = prompts.get('vectorsDataBank');
|
||||
|
||||
if (vectorsDataBank.position) {
|
||||
chatCompletion.insert(Message.fromPrompt(vectorsDataBank), 'main', vectorsDataBank.position);
|
||||
}
|
||||
}
|
||||
|
||||
// Smart Context (ChromaDB)
|
||||
if (prompts.has('smartContext')) {
|
||||
const smartContext = prompts.get('smartContext');
|
||||
@ -1089,6 +1098,14 @@ function preparePromptsForChatCompletion({ Scenario, charPersonality, name2, wor
|
||||
position: getPromptPosition(vectorsMemory.position),
|
||||
});
|
||||
|
||||
const vectorsDataBank = extensionPrompts['4_vectors_data_bank'];
|
||||
if (vectorsDataBank && vectorsDataBank.value) systemPrompts.push({
|
||||
role: getPromptRole(vectorsDataBank.role),
|
||||
content: vectorsDataBank.value,
|
||||
identifier: 'vectorsDataBank',
|
||||
position: getPromptPosition(vectorsDataBank.position),
|
||||
});
|
||||
|
||||
// Smart Context (ChromaDB)
|
||||
const smartContext = extensionPrompts['chromadb'];
|
||||
if (smartContext && smartContext.value) systemPrompts.push({
|
||||
|
Reference in New Issue
Block a user