MCPcopy Index your code
hub / github.com/simstudioai/sim / resolveChunkerOptions

Function resolveChunkerOptions

apps/sim/lib/chunkers/utils.ts:131–143  ·  view source on GitHub ↗
(options: {
  chunkSize?: number
  chunkOverlap?: number
  minCharactersPerChunk?: number
})

Source from the content-addressed store, hash-verified

129}
130
131export function resolveChunkerOptions(options: {
132 chunkSize?: number
133 chunkOverlap?: number
134 minCharactersPerChunk?: number
135}): { chunkSize: number; chunkOverlap: number; minCharactersPerChunk: number } {
136 const chunkSize = options.chunkSize ?? 1024
137 const maxOverlap = Math.floor(chunkSize * 0.5)
138 return {
139 chunkSize,
140 chunkOverlap: Math.min(options.chunkOverlap ?? 0, maxOverlap),
141 minCharactersPerChunk: options.minCharactersPerChunk ?? 100,
142 }
143}

Callers 6

constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
utils.test.tsFile · 0.90
constructorMethod · 0.90
constructorMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected