Skip to content

Commit

Permalink
Sync Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
iceener committed Nov 23, 2024
1 parent 5314e62 commit 1c9c7f2
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions sync/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ async function initializeData() {

const docs = await dbService.getAllDocuments();

// if (docs.length === 0) {
// for (const book of talebBooks) {
// const document = {
// uuid: uuidv4(),
// name: book.title,
// content: book.description,
// source: "initialization",
// conversation_uuid: uuidv4(),
// type: "book",
// description: `A book by ${book.author}`,
// indexed: true,
// };
if (docs.length === 0) {
for (const book of talebBooks) {
const document = {
uuid: uuidv4(),
name: book.title,
content: book.description,
source: "initialization",
conversation_uuid: uuidv4(),
type: "book",
description: `A book by ${book.author}`,
indexed: true,
};

// // Insert into SQLite database, which will sync to Algolia and Qdrant
// await dbService.insertDocument(document);
// }
// }
// Insert into SQLite database, which will sync to Algolia and Qdrant
await dbService.insertDocument(document);
}
}

await dbService.updateDocument("4248fef8-e247-4a18-b104-46a93edd915a", {
name: "Antifragile 2",
Expand Down

0 comments on commit 1c9c7f2

Please sign in to comment.