MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / getEmbedChunkChars

Function getEmbedChunkChars

src/core/embeddings.ts:183–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181}
182
183export function getEmbedChunkChars(): number {
184 const requested = toIntegerOr(process.env.CONTEXTPLUS_EMBED_CHUNK_CHARS, DEFAULT_EMBED_CHUNK_CHARS);
185 return Math.min(MAX_EMBED_CHUNK_CHARS, Math.max(MIN_EMBED_CHUNK_CHARS, requested));
186}
187
188function getErrorMessage(error: unknown): string {
189 if (error instanceof Error) return error.message;

Callers 1

splitEmbeddingInputFunction · 0.85

Calls 1

toIntegerOrFunction · 0.70

Tested by

no test coverage detected