diff options
| author | Dhravya <[email protected]> | 2024-06-16 18:28:11 -0500 |
|---|---|---|
| committer | Dhravya <[email protected]> | 2024-06-16 18:28:11 -0500 |
| commit | 0f3d5c4fc64a7e917dcd0308e648f28988b57fd1 (patch) | |
| tree | d7a848572c3ff4e6efd14bbdb686aaa475abf4b3 | |
| parent | OCR try (diff) | |
| download | supermemory-0f3d5c4fc64a7e917dcd0308e648f28988b57fd1.tar.xz supermemory-0f3d5c4fc64a7e917dcd0308e648f28988b57fd1.zip | |
store full info
| -rw-r--r-- | apps/cf-ai-backend/src/index.ts | 13 |
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) : []), |