diff options
| -rw-r--r-- | apps/cf-ai-backend/src/index.ts | 2 | ||||
| -rw-r--r-- | apps/web/app/actions/doers.ts | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/apps/cf-ai-backend/src/index.ts b/apps/cf-ai-backend/src/index.ts index a434d5b5..0844c22e 100644 --- a/apps/cf-ai-backend/src/index.ts +++ b/apps/cf-ai-backend/src/index.ts @@ -66,7 +66,7 @@ app.post("/api/add", zValidator("json", vectorObj), async (c) => { console.log(body.spaces); const chunks = chunkText(body.pageContent, 1536); if (chunks.length > 20) { - return c.json({ status: "error", message: "no chunks over 20" }); + return c.json({ status: "error", message: "We are unable to process documents this size just yet, try something smaller" }); } const chunkedInput = await batchCreateChunksAndEmbeddings({ store, diff --git a/apps/web/app/actions/doers.ts b/apps/web/app/actions/doers.ts index 6ce8c230..fcbab0f8 100644 --- a/apps/web/app/actions/doers.ts +++ b/apps/web/app/actions/doers.ts @@ -270,15 +270,11 @@ export const createMemory = async (input: { try { if (response.status !== "ok") { - if ( - response.status === "error" && - response.message === "no chunks over 20" - ) { + if (response.status === "error") { return { success: false, data: 0, - error: - "We are unable to process documents this size just yet, try something smaller", + error: response.message, }; } else { return { |