mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-14 23:21:20 +00:00
remove everything inside raw tags
This commit is contained in:
parent
c511f451bb
commit
3bc6fc017a
1 changed files with 5 additions and 1 deletions
|
|
@ -64,7 +64,11 @@ app.post("/api/add", zValidator("json", vectorObj), async (c) => {
|
|||
const { store } = await initQuery(c);
|
||||
|
||||
console.log(body.spaces);
|
||||
const chunks = chunkText(body.pageContent, 1536);
|
||||
|
||||
// remove everything in <raw> tags
|
||||
const newPageContent = body.pageContent?.replace(/<raw>.*?<\/raw>/g, "");
|
||||
|
||||
const chunks = chunkText(newPageContent, 1536);
|
||||
if (chunks.length > 20) {
|
||||
return c.json({
|
||||
status: "error",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue