diff --git a/apps/rowboat/app/actions/project_actions.ts b/apps/rowboat/app/actions/project_actions.ts index 4abcb730..062d3a68 100644 --- a/apps/rowboat/app/actions/project_actions.ts +++ b/apps/rowboat/app/actions/project_actions.ts @@ -1,7 +1,7 @@ 'use server'; import { redirect } from "next/navigation"; import { ObjectId } from "mongodb"; -import { db, dataSourcesCollection, embeddingsCollection, projectsCollection, projectMembersCollection, apiKeysCollection, dataSourceDocsCollection } from "../lib/mongodb"; +import { db, dataSourcesCollection, projectsCollection, projectMembersCollection, apiKeysCollection, dataSourceDocsCollection } from "../lib/mongodb"; import { z } from 'zod'; import crypto from 'crypto'; import { revalidatePath } from "next/cache"; @@ -244,9 +244,6 @@ export async function deleteProject(projectId: string) { const ids = sources.map(s => s._id); // delete data sources - await embeddingsCollection.deleteMany({ - sourceId: { $in: ids.map(i => i.toString()) }, - }); await dataSourcesCollection.deleteMany({ _id: { $in: ids, diff --git a/apps/rowboat/app/lib/mongodb.ts b/apps/rowboat/app/lib/mongodb.ts index 60c01afd..bb9fc838 100644 --- a/apps/rowboat/app/lib/mongodb.ts +++ b/apps/rowboat/app/lib/mongodb.ts @@ -16,10 +16,8 @@ const client = new MongoClient(process.env["MONGODB_CONNECTION_STRING"] || "mong export const db = client.db("rowboat"); export const dataSourcesCollection = db.collection>("sources"); export const dataSourceDocsCollection = db.collection>("source_docs"); -export const embeddingsCollection = db.collection>("embeddings"); export const projectsCollection = db.collection>("projects"); export const projectMembersCollection = db.collection>("project_members"); -export const webpagesCollection = db.collection>('webpages'); export const agentWorkflowsCollection = db.collection>("agent_workflows"); export const apiKeysCollection = db.collection>("api_keys"); export const chatsCollection = db.collection>("chats");