mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-03-16 07:02:22 +00:00
remove lancedb logging
This commit is contained in:
parent
5c933cba17
commit
ca8e8245fc
1 changed files with 4 additions and 8 deletions
|
@ -26,9 +26,8 @@ function curateLanceSources(sources = []) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const LanceDb = {
|
const LanceDb = {
|
||||||
uri: `${
|
uri: `${!!process.env.STORAGE_DIR ? `${process.env.STORAGE_DIR}/` : "./storage/"
|
||||||
!!process.env.STORAGE_DIR ? `${process.env.STORAGE_DIR}/` : "./storage/"
|
}lancedb`,
|
||||||
}lancedb`,
|
|
||||||
name: "LanceDb",
|
name: "LanceDb",
|
||||||
connect: async function () {
|
connect: async function () {
|
||||||
if (process.env.VECTOR_DB !== "lancedb")
|
if (process.env.VECTOR_DB !== "lancedb")
|
||||||
|
@ -91,13 +90,11 @@ const LanceDb = {
|
||||||
updateOrCreateCollection: async function (client, data = [], namespace) {
|
updateOrCreateCollection: async function (client, data = [], namespace) {
|
||||||
if (await this.hasNamespace(namespace)) {
|
if (await this.hasNamespace(namespace)) {
|
||||||
const collection = await client.openTable(namespace);
|
const collection = await client.openTable(namespace);
|
||||||
const result = await collection.add(data);
|
await collection.add(data);
|
||||||
console.log({ result });
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await client.createTable(namespace, data);
|
await client.createTable(namespace, data);
|
||||||
console.log({ result });
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
hasNamespace: async function (namespace = null) {
|
hasNamespace: async function (namespace = null) {
|
||||||
|
@ -149,7 +146,6 @@ const LanceDb = {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(submissions);
|
|
||||||
await this.updateOrCreateCollection(client, submissions, namespace);
|
await this.updateOrCreateCollection(client, submissions, namespace);
|
||||||
await DocumentVectors.bulkInsert(documentVectors);
|
await DocumentVectors.bulkInsert(documentVectors);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue