added mistral vector support (off the back of oai's)

This commit is contained in:
based
2023-12-16 08:37:39 +10:00
parent c517483141
commit 5dd2e8cd88
4 changed files with 12 additions and 7 deletions

View File

@@ -394,7 +394,8 @@ async function getSavedHashes(collectionId) {
*/
async function insertVectorItems(collectionId, items) {
if (settings.source === 'openai' && !secret_state[SECRET_KEYS.OPENAI] ||
settings.source === 'palm' && !secret_state[SECRET_KEYS.MAKERSUITE]) {
settings.source === 'palm' && !secret_state[SECRET_KEYS.MAKERSUITE] ||
settings.source === 'mistral' && !secret_state[SECRET_KEYS.MISTRALAI]) {
throw new Error('Vectors: API key missing', { cause: 'api_key_missing' });
}