Migrate Palm secret key, fix vector source key access

This commit is contained in:
Cohee
2023-12-14 19:33:23 +02:00
parent 5071b9a369
commit d4f96020f2
3 changed files with 28 additions and 9 deletions

View File

@@ -17,7 +17,7 @@ async function getVector(source, text) {
case 'transformers':
return require('../embedding').getTransformersVector(text);
case 'palm':
return require('../palm-vectors').getPaLMVector(text);
return require('../makersuite-vectors').getMakerSuiteVector(text);
}
throw new Error(`Unknown vector source ${source}`);
@@ -196,7 +196,7 @@ router.post('/purge', jsonParser, async (req, res) => {
const collectionId = String(req.body.collectionId);
const sources = ['transformers', 'openai'];
const sources = ['transformers', 'openai', 'palm'];
for (const source of sources) {
const index = await getIndex(collectionId, source, false);