Skip to content

Commit

Permalink
Update generation.ts
Browse files Browse the repository at this point in the history
Chunk size and overlap is too small for most rag documents
  • Loading branch information
adventuresinai authored Jan 19, 2025
1 parent cfd1f48 commit da603bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/generation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1348,8 +1348,8 @@ export async function generateShouldRespond({
*/
export async function splitChunks(
content: string,
chunkSize = 512,
bleed = 20
chunkSize = 1500,
bleed = 100
): Promise<string[]> {
elizaLogger.debug(`[splitChunks] Starting text split`);

Expand Down Expand Up @@ -2556,4 +2556,4 @@ export async function generateTweetActions({
await new Promise((resolve) => setTimeout(resolve, retryDelay));
retryDelay *= 2;
}
}
}

0 comments on commit da603bb

Please sign in to comment.