From 0f3d5c4fc64a7e917dcd0308e648f28988b57fd1 Mon Sep 17 00:00:00 2001 From: Dhravya Date: Sun, 16 Jun 2024 18:28:11 -0500 Subject: [PATCH] store full info --- apps/cf-ai-backend/src/index.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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) : []),