mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix purge extras and mistral vectors
This commit is contained in:
@@ -4,6 +4,9 @@ const express = require('express');
|
||||
const sanitize = require('sanitize-filename');
|
||||
const { jsonParser } = require('../express-common');
|
||||
|
||||
// Don't forget to add new sources to the SOURCES array
|
||||
const SOURCES = ['transformers', 'mistral', 'openai', 'extras', 'palm'];
|
||||
|
||||
/**
|
||||
* Gets the vector for the given text from the given source.
|
||||
* @param {string} source - The source of the vector
|
||||
@@ -261,8 +264,7 @@ router.post('/purge', jsonParser, async (req, res) => {
|
||||
|
||||
const collectionId = String(req.body.collectionId);
|
||||
|
||||
const sources = ['transformers', 'openai', 'palm'];
|
||||
for (const source of sources) {
|
||||
for (const source of SOURCES) {
|
||||
const index = await getIndex(collectionId, source, false);
|
||||
|
||||
const exists = await index.isIndexCreated();
|
||||
|
||||
Reference in New Issue
Block a user