aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDhravya <[email protected]>2024-06-16 18:28:11 -0500
committerDhravya <[email protected]>2024-06-16 18:28:11 -0500
commit0f3d5c4fc64a7e917dcd0308e648f28988b57fd1 (patch)
treed7a848572c3ff4e6efd14bbdb686aaa475abf4b3
parentOCR try (diff)
downloadsupermemory-0f3d5c4fc64a7e917dcd0308e648f28988b57fd1.tar.xz
supermemory-0f3d5c4fc64a7e917dcd0308e648f28988b57fd1.zip
store full info
-rw-r--r--apps/cf-ai-backend/src/index.ts13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/cf-ai-backend/src/index.ts b/apps/cf-ai-backend/src/index.ts
index 69edbbe7..75a3b8e8 100644
--- a/apps/cf-ai-backend/src/index.ts
+++ b/apps/cf-ai-backend/src/index.ts
@@ -126,7 +126,18 @@ app.post(
await batchCreateChunksAndEmbeddings({
store,
- body,
+ body: {
+ url: body.url,
+ user: body.user,
+ type: "image",
+ description:
+ imageDescriptions.length > 1
+ ? `A group of ${imageDescriptions.length} images on ${body.url}`
+ : imageDescriptions[0],
+ space: body.space,
+ pageContent: imageDescriptions.join("\n"),
+ title: "Image content from the web",
+ },
chunks: [
imageDescriptions,
...(body.text ? chunkText(body.text, 1536) : []),