mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-19 04:30:10 +01:00
Renamed all indicies to vectors to avoid confusion of vocab (#246)
* renamed all indicies to vectors to avoid confusion of vocab * removing unneeded files * changed indicies on frontend sidebar to vectors
This commit is contained in:
parent
a505928934
commit
ce6951b21f
@ -26,7 +26,7 @@ export default function IndexCount() {
|
||||
<div className="flex w-full items-center justify-end gap-x-2">
|
||||
<div className="flex items-center gap-x-1 px-2 rounded-full">
|
||||
<p className="text-slate-400 leading-tight text-sm">
|
||||
{numberWithCommas(indexes)} {pluralize("index", indexes)}
|
||||
{numberWithCommas(indexes)} {pluralize("vector", indexes)}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -90,7 +90,7 @@ function apiSystemEndpoints(app) {
|
||||
*/
|
||||
try {
|
||||
const VectorDb = getVectorDbClass();
|
||||
const vectorCount = await VectorDb.totalIndicies();
|
||||
const vectorCount = await VectorDb.totalVectors();
|
||||
response.status(200).json({ vectorCount });
|
||||
} catch (e) {
|
||||
console.log(e.message, e);
|
||||
|
@ -166,7 +166,7 @@ function systemEndpoints(app) {
|
||||
app.get("/system/system-vectors", [validatedRequest], async (_, response) => {
|
||||
try {
|
||||
const VectorDb = getVectorDbClass();
|
||||
const vectorCount = await VectorDb.totalIndicies();
|
||||
const vectorCount = await VectorDb.totalVectors();
|
||||
response.status(200).json({ vectorCount });
|
||||
} catch (e) {
|
||||
console.log(e.message, e);
|
||||
|
@ -26,7 +26,7 @@ const Chroma = {
|
||||
const { client } = await this.connect();
|
||||
return { heartbeat: await client.heartbeat() };
|
||||
},
|
||||
totalIndicies: async function () {
|
||||
totalVectors: async function () {
|
||||
const { client } = await this.connect();
|
||||
const collections = await client.listCollections();
|
||||
var totalVectors = 0;
|
||||
|
@ -28,7 +28,7 @@ const LanceDb = {
|
||||
const dirs = fs.readdirSync(client.uri);
|
||||
return dirs.map((folder) => folder.replace(".lance", ""));
|
||||
},
|
||||
totalIndicies: async function () {
|
||||
totalVectors: async function () {
|
||||
const { client } = await this.connect();
|
||||
const tables = await this.tables();
|
||||
let count = 0;
|
||||
|
@ -24,7 +24,7 @@ const Pinecone = {
|
||||
if (!status.ready) throw new Error("Pinecode::Index not ready.");
|
||||
return { client, pineconeIndex, indexName: process.env.PINECONE_INDEX };
|
||||
},
|
||||
totalIndicies: async function () {
|
||||
totalVectors: async function () {
|
||||
const { pineconeIndex } = await this.connect();
|
||||
const { namespaces } = await pineconeIndex.describeIndexStats1();
|
||||
return Object.values(namespaces).reduce(
|
||||
|
@ -30,7 +30,7 @@ const QDrant = {
|
||||
await this.connect();
|
||||
return { heartbeat: Number(new Date()) };
|
||||
},
|
||||
totalIndicies: async function () {
|
||||
totalVectors: async function () {
|
||||
const { client } = await this.connect();
|
||||
const { collections } = await client.getCollections();
|
||||
var totalVectors = 0;
|
||||
|
@ -32,7 +32,7 @@ const Weaviate = {
|
||||
await this.connect();
|
||||
return { heartbeat: Number(new Date()) };
|
||||
},
|
||||
totalIndicies: async function () {
|
||||
totalVectors: async function () {
|
||||
const { client } = await this.connect();
|
||||
const collectionNames = await this.allNamespaces(client);
|
||||
var totalVectors = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user