mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-03-27 08:04:43 +00:00
19 lines
378 B
JavaScript
19 lines
378 B
JavaScript
|
const { Pinecone } = require("../pinecone");
|
||
|
const { Chroma } = require("../chroma");
|
||
|
|
||
|
function getVectorDbClass() {
|
||
|
const vectorSelection = process.env.VECTOR_DB || "pinecone";
|
||
|
switch (vectorSelection) {
|
||
|
case "pinecone":
|
||
|
return Pinecone;
|
||
|
case "chroma":
|
||
|
return Chroma;
|
||
|
default:
|
||
|
return Pinecone;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
getVectorDbClass,
|
||
|
};
|