From b333b06772c89d96aacb5490d6a219fba7c09cc6 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Thu, 12 Feb 2026 20:57:17 +0100 Subject: Engage! --- .../server/webui/src/lib/constants/binary-detection.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 llama.cpp/tools/server/webui/src/lib/constants/binary-detection.ts (limited to 'llama.cpp/tools/server/webui/src/lib/constants/binary-detection.ts') diff --git a/llama.cpp/tools/server/webui/src/lib/constants/binary-detection.ts b/llama.cpp/tools/server/webui/src/lib/constants/binary-detection.ts new file mode 100644 index 0000000..a4440fd --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/binary-detection.ts @@ -0,0 +1,14 @@ +export interface BinaryDetectionOptions { + /** Number of characters to check from the beginning of the file */ + prefixLength: number; + /** Maximum ratio of suspicious characters allowed (0.0 to 1.0) */ + suspiciousCharThresholdRatio: number; + /** Maximum absolute number of null bytes allowed */ + maxAbsoluteNullBytes: number; +} + +export const DEFAULT_BINARY_DETECTION_OPTIONS: BinaryDetectionOptions = { + prefixLength: 1024 * 10, // Check the first 10KB of the string + suspiciousCharThresholdRatio: 0.15, // Allow up to 15% suspicious chars + maxAbsoluteNullBytes: 2 +}; -- cgit v1.2.3