We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3638a0 commit aa50235Copy full SHA for aa50235
1 file changed
app/api/chat/route.ts
@@ -30,7 +30,7 @@ async function createSearchServer() {
30
title: page.data.title,
31
description: page.data.description,
32
url: page.url,
33
- content: await page.data.getText('raw'),
+ content: await page.data.getText('processed'),
34
} as CustomDocument;
35
}),
36
);
@@ -69,7 +69,7 @@ export async function POST(req: Request) {
69
if (reqJson.pageUrl) {
70
const page = source.getPages().find((p) => p.url === reqJson.pageUrl);
71
if (page && 'getText' in page.data) {
72
- const content = await page.data.getText('raw');
+ const content = await page.data.getText('processed');
73
contextPrompt += `\n\nThe user is currently viewing the page "${page.data.title}" (${reqJson.pageUrl}). Here is its content for context:\n\n${content}`;
74
}
75
0 commit comments