aboutsummaryrefslogtreecommitdiff
path: root/apps/cf-ai-backend/src/index.ts
diff options
context:
space:
mode:
authorKush Thaker <[email protected]>2024-07-27 22:11:10 +0530
committerKush Thaker <[email protected]>2024-07-27 22:11:10 +0530
commite8b623333def214e0ed55609f6c0b80deae17f48 (patch)
tree63e4c845d65e7b34d9d578f7c00ba56c82dad5d0 /apps/cf-ai-backend/src/index.ts
parentMerge pull request #140 from supermemoryai/kush/experimental-thread (diff)
downloadsupermemory-kush/fix-threads.tar.xz
supermemory-kush/fix-threads.zip
fix tweets and sourceskush/fix-threads
Diffstat (limited to 'apps/cf-ai-backend/src/index.ts')
-rw-r--r--apps/cf-ai-backend/src/index.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/cf-ai-backend/src/index.ts b/apps/cf-ai-backend/src/index.ts
index a3ac1380..1a118327 100644
--- a/apps/cf-ai-backend/src/index.ts
+++ b/apps/cf-ai-backend/src/index.ts
@@ -77,19 +77,19 @@ app.post("/api/add", zValidator("json", vectorObj), async (c) => {
console.log(body.spaces);
let chunks: TweetChunks | PageOrNoteChunks;
// remove everything in <raw> tags
- const newPageContent = body.pageContent?.replace(/<raw>.*?<\/raw>/g, "");
+ // const newPageContent = body.pageContent?.replace(/<raw>.*?<\/raw>/g, "");
switch (body.type) {
case "tweet":
- chunks = chunkThread(newPageContent);
+ chunks = chunkThread(body.pageContent);
break;
case "page":
- chunks = chunkPage(newPageContent);
+ chunks = chunkPage(body.pageContent);
break;
case "note":
- chunks = chunkNote(newPageContent);
+ chunks = chunkNote(body.pageContent);
break;
}