这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/components/Sidebar/IndexCount.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
22 changes: 11 additions & 11 deletions server/endpoints/api/system/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function apiSystemEndpoints(app) {
if (!app) return;

app.get("/v1/system/env-dump", async (_, response) => {
/*
/*
#swagger.tags = ['System Settings']
#swagger.description = 'Dump all settings to file storage'
#swagger.responses[403] = {
Expand All @@ -29,7 +29,7 @@ function apiSystemEndpoints(app) {
});

app.get("/v1/system", [validApiKey], async (_, response) => {
/*
/*
#swagger.tags = ['System Settings']
#swagger.description = 'Get all current system settings that are defined.'
#swagger.responses[200] = {
Expand All @@ -48,9 +48,9 @@ function apiSystemEndpoints(app) {
}
}
}
}
}
}
}
}
#swagger.responses[403] = {
schema: {
"$ref": "#/definitions/InvalidAPIKey"
Expand All @@ -67,7 +67,7 @@ function apiSystemEndpoints(app) {
});

app.get("/v1/system/vector-count", [validApiKey], async (_, response) => {
/*
/*
#swagger.tags = ['System Settings']
#swagger.description = 'Number of all vectors in connected vector database'
#swagger.responses[200] = {
Expand All @@ -79,9 +79,9 @@ function apiSystemEndpoints(app) {
"vectorCount": 5450
}
}
}
}
}
}
}
#swagger.responses[403] = {
schema: {
"$ref": "#/definitions/InvalidAPIKey"
Expand All @@ -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);
Expand All @@ -102,7 +102,7 @@ function apiSystemEndpoints(app) {
"/v1/system/update-env",
[validApiKey],
async (request, response) => {
/*
/*
#swagger.tags = ['System Settings']
#swagger.description = 'Update a system setting or preference.'
#swagger.requestBody = {
Expand All @@ -128,9 +128,9 @@ function apiSystemEndpoints(app) {
error: 'error goes here, otherwise null'
}
}
}
}
}
}
}
#swagger.responses[403] = {
schema: {
"$ref": "#/definitions/InvalidAPIKey"
Expand Down
2 changes: 1 addition & 1 deletion server/endpoints/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion server/utils/vectorDbProviders/chroma/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion server/utils/vectorDbProviders/lance/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion server/utils/vectorDbProviders/pinecone/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion server/utils/vectorDbProviders/qdrant/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion server/utils/vectorDbProviders/weaviate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down