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:
Sean Hatfield 2023-09-21 12:04:17 -07:00 committed by GitHub
parent a505928934
commit ce6951b21f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 18 deletions

View File

@ -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>

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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(

View File

@ -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;

View File

@ -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;