store full info

This commit is contained in:
Dhravya 2024-06-16 18:28:11 -05:00
parent a87030b88b
commit 0f3d5c4fc6

View file

@ -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) : []),