()
| 181 | } |
| 182 | |
| 183 | export 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 | |
| 188 | function getErrorMessage(error: unknown): string { |
| 189 | if (error instanceof Error) return error.message; |
no test coverage detected