rag-lite-ts 1.0.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/README.md +606 -93
  2. package/dist/cli/indexer.js +192 -4
  3. package/dist/cli/search.js +50 -11
  4. package/dist/cli.js +183 -26
  5. package/dist/core/abstract-embedder.d.ts +125 -0
  6. package/dist/core/abstract-embedder.js +264 -0
  7. package/dist/core/actionable-error-messages.d.ts +60 -0
  8. package/dist/core/actionable-error-messages.js +397 -0
  9. package/dist/core/batch-processing-optimizer.d.ts +155 -0
  10. package/dist/core/batch-processing-optimizer.js +541 -0
  11. package/dist/core/chunker.d.ts +2 -0
  12. package/dist/core/cli-database-utils.d.ts +53 -0
  13. package/dist/core/cli-database-utils.js +239 -0
  14. package/dist/core/config.js +10 -3
  15. package/dist/core/content-errors.d.ts +111 -0
  16. package/dist/core/content-errors.js +362 -0
  17. package/dist/core/content-manager.d.ts +343 -0
  18. package/dist/core/content-manager.js +1504 -0
  19. package/dist/core/content-performance-optimizer.d.ts +150 -0
  20. package/dist/core/content-performance-optimizer.js +516 -0
  21. package/dist/core/content-resolver.d.ts +104 -0
  22. package/dist/core/content-resolver.js +285 -0
  23. package/dist/core/cross-modal-search.d.ts +164 -0
  24. package/dist/core/cross-modal-search.js +342 -0
  25. package/dist/core/database-connection-manager.d.ts +109 -0
  26. package/dist/core/database-connection-manager.js +304 -0
  27. package/dist/core/db.d.ts +141 -2
  28. package/dist/core/db.js +631 -89
  29. package/dist/core/embedder-factory.d.ts +176 -0
  30. package/dist/core/embedder-factory.js +338 -0
  31. package/dist/core/index.d.ts +3 -1
  32. package/dist/core/index.js +4 -1
  33. package/dist/core/ingestion.d.ts +85 -15
  34. package/dist/core/ingestion.js +510 -45
  35. package/dist/core/lazy-dependency-loader.d.ts +152 -0
  36. package/dist/core/lazy-dependency-loader.js +453 -0
  37. package/dist/core/mode-detection-service.d.ts +150 -0
  38. package/dist/core/mode-detection-service.js +565 -0
  39. package/dist/core/mode-model-validator.d.ts +92 -0
  40. package/dist/core/mode-model-validator.js +203 -0
  41. package/dist/core/model-registry.d.ts +120 -0
  42. package/dist/core/model-registry.js +415 -0
  43. package/dist/core/model-validator.d.ts +217 -0
  44. package/dist/core/model-validator.js +782 -0
  45. package/dist/core/polymorphic-search-factory.d.ts +154 -0
  46. package/dist/core/polymorphic-search-factory.js +344 -0
  47. package/dist/core/raglite-paths.d.ts +121 -0
  48. package/dist/core/raglite-paths.js +145 -0
  49. package/dist/core/reranking-config.d.ts +42 -0
  50. package/dist/core/reranking-config.js +156 -0
  51. package/dist/core/reranking-factory.d.ts +92 -0
  52. package/dist/core/reranking-factory.js +591 -0
  53. package/dist/core/reranking-strategies.d.ts +325 -0
  54. package/dist/core/reranking-strategies.js +720 -0
  55. package/dist/core/resource-cleanup.d.ts +163 -0
  56. package/dist/core/resource-cleanup.js +371 -0
  57. package/dist/core/resource-manager.d.ts +212 -0
  58. package/dist/core/resource-manager.js +564 -0
  59. package/dist/core/search.d.ts +28 -1
  60. package/dist/core/search.js +83 -5
  61. package/dist/core/streaming-operations.d.ts +145 -0
  62. package/dist/core/streaming-operations.js +409 -0
  63. package/dist/core/types.d.ts +3 -0
  64. package/dist/core/universal-embedder.d.ts +177 -0
  65. package/dist/core/universal-embedder.js +139 -0
  66. package/dist/core/validation-messages.d.ts +99 -0
  67. package/dist/core/validation-messages.js +334 -0
  68. package/dist/core/vector-index.js +7 -8
  69. package/dist/factories/index.d.ts +1 -1
  70. package/dist/factories/text-factory.d.ts +128 -34
  71. package/dist/factories/text-factory.js +346 -97
  72. package/dist/file-processor.d.ts +88 -2
  73. package/dist/file-processor.js +720 -17
  74. package/dist/index.d.ts +9 -0
  75. package/dist/index.js +11 -0
  76. package/dist/ingestion.d.ts +16 -0
  77. package/dist/ingestion.js +21 -0
  78. package/dist/mcp-server.d.ts +35 -3
  79. package/dist/mcp-server.js +1107 -31
  80. package/dist/multimodal/clip-embedder.d.ts +314 -0
  81. package/dist/multimodal/clip-embedder.js +945 -0
  82. package/dist/multimodal/index.d.ts +6 -0
  83. package/dist/multimodal/index.js +6 -0
  84. package/dist/run-error-recovery-tests.d.ts +7 -0
  85. package/dist/run-error-recovery-tests.js +101 -0
  86. package/dist/search.d.ts +26 -0
  87. package/dist/search.js +54 -1
  88. package/dist/test-utils.d.ts +8 -26
  89. package/dist/text/chunker.d.ts +1 -0
  90. package/dist/text/embedder.js +15 -8
  91. package/dist/text/index.d.ts +1 -0
  92. package/dist/text/index.js +1 -0
  93. package/dist/text/reranker.d.ts +1 -2
  94. package/dist/text/reranker.js +17 -47
  95. package/dist/text/sentence-transformer-embedder.d.ts +96 -0
  96. package/dist/text/sentence-transformer-embedder.js +340 -0
  97. package/dist/types.d.ts +39 -0
  98. package/dist/utils/vector-math.d.ts +31 -0
  99. package/dist/utils/vector-math.js +70 -0
  100. package/package.json +15 -3
  101. package/dist/api-errors.d.ts.map +0 -1
  102. package/dist/api-errors.js.map +0 -1
  103. package/dist/cli/indexer.d.ts.map +0 -1
  104. package/dist/cli/indexer.js.map +0 -1
  105. package/dist/cli/search.d.ts.map +0 -1
  106. package/dist/cli/search.js.map +0 -1
  107. package/dist/cli.d.ts.map +0 -1
  108. package/dist/cli.js.map +0 -1
  109. package/dist/config.d.ts.map +0 -1
  110. package/dist/config.js.map +0 -1
  111. package/dist/core/adapters.d.ts.map +0 -1
  112. package/dist/core/adapters.js.map +0 -1
  113. package/dist/core/chunker.d.ts.map +0 -1
  114. package/dist/core/chunker.js.map +0 -1
  115. package/dist/core/config.d.ts.map +0 -1
  116. package/dist/core/config.js.map +0 -1
  117. package/dist/core/db.d.ts.map +0 -1
  118. package/dist/core/db.js.map +0 -1
  119. package/dist/core/error-handler.d.ts.map +0 -1
  120. package/dist/core/error-handler.js.map +0 -1
  121. package/dist/core/index.d.ts.map +0 -1
  122. package/dist/core/index.js.map +0 -1
  123. package/dist/core/ingestion.d.ts.map +0 -1
  124. package/dist/core/ingestion.js.map +0 -1
  125. package/dist/core/interfaces.d.ts.map +0 -1
  126. package/dist/core/interfaces.js.map +0 -1
  127. package/dist/core/path-manager.d.ts.map +0 -1
  128. package/dist/core/path-manager.js.map +0 -1
  129. package/dist/core/search-example.d.ts +0 -25
  130. package/dist/core/search-example.d.ts.map +0 -1
  131. package/dist/core/search-example.js +0 -138
  132. package/dist/core/search-example.js.map +0 -1
  133. package/dist/core/search-pipeline-example.d.ts +0 -21
  134. package/dist/core/search-pipeline-example.d.ts.map +0 -1
  135. package/dist/core/search-pipeline-example.js +0 -188
  136. package/dist/core/search-pipeline-example.js.map +0 -1
  137. package/dist/core/search-pipeline.d.ts.map +0 -1
  138. package/dist/core/search-pipeline.js.map +0 -1
  139. package/dist/core/search.d.ts.map +0 -1
  140. package/dist/core/search.js.map +0 -1
  141. package/dist/core/types.d.ts.map +0 -1
  142. package/dist/core/types.js.map +0 -1
  143. package/dist/core/vector-index.d.ts.map +0 -1
  144. package/dist/core/vector-index.js.map +0 -1
  145. package/dist/dom-polyfills.d.ts.map +0 -1
  146. package/dist/dom-polyfills.js.map +0 -1
  147. package/dist/examples/clean-api-examples.d.ts +0 -44
  148. package/dist/examples/clean-api-examples.d.ts.map +0 -1
  149. package/dist/examples/clean-api-examples.js +0 -206
  150. package/dist/examples/clean-api-examples.js.map +0 -1
  151. package/dist/factories/index.d.ts.map +0 -1
  152. package/dist/factories/index.js.map +0 -1
  153. package/dist/factories/text-factory.d.ts.map +0 -1
  154. package/dist/factories/text-factory.js.map +0 -1
  155. package/dist/file-processor.d.ts.map +0 -1
  156. package/dist/file-processor.js.map +0 -1
  157. package/dist/index-manager.d.ts.map +0 -1
  158. package/dist/index-manager.js.map +0 -1
  159. package/dist/index.d.ts.map +0 -1
  160. package/dist/index.js.map +0 -1
  161. package/dist/indexer.d.ts.map +0 -1
  162. package/dist/indexer.js.map +0 -1
  163. package/dist/ingestion.d.ts.map +0 -1
  164. package/dist/ingestion.js.map +0 -1
  165. package/dist/mcp-server.d.ts.map +0 -1
  166. package/dist/mcp-server.js.map +0 -1
  167. package/dist/preprocess.d.ts.map +0 -1
  168. package/dist/preprocess.js.map +0 -1
  169. package/dist/preprocessors/index.d.ts.map +0 -1
  170. package/dist/preprocessors/index.js.map +0 -1
  171. package/dist/preprocessors/mdx.d.ts.map +0 -1
  172. package/dist/preprocessors/mdx.js.map +0 -1
  173. package/dist/preprocessors/mermaid.d.ts.map +0 -1
  174. package/dist/preprocessors/mermaid.js.map +0 -1
  175. package/dist/preprocessors/registry.d.ts.map +0 -1
  176. package/dist/preprocessors/registry.js.map +0 -1
  177. package/dist/search-standalone.d.ts.map +0 -1
  178. package/dist/search-standalone.js.map +0 -1
  179. package/dist/search.d.ts.map +0 -1
  180. package/dist/search.js.map +0 -1
  181. package/dist/test-utils.d.ts.map +0 -1
  182. package/dist/test-utils.js.map +0 -1
  183. package/dist/text/chunker.d.ts.map +0 -1
  184. package/dist/text/chunker.js.map +0 -1
  185. package/dist/text/embedder.d.ts.map +0 -1
  186. package/dist/text/embedder.js.map +0 -1
  187. package/dist/text/index.d.ts.map +0 -1
  188. package/dist/text/index.js.map +0 -1
  189. package/dist/text/preprocessors/index.d.ts.map +0 -1
  190. package/dist/text/preprocessors/index.js.map +0 -1
  191. package/dist/text/preprocessors/mdx.d.ts.map +0 -1
  192. package/dist/text/preprocessors/mdx.js.map +0 -1
  193. package/dist/text/preprocessors/mermaid.d.ts.map +0 -1
  194. package/dist/text/preprocessors/mermaid.js.map +0 -1
  195. package/dist/text/preprocessors/registry.d.ts.map +0 -1
  196. package/dist/text/preprocessors/registry.js.map +0 -1
  197. package/dist/text/reranker.d.ts.map +0 -1
  198. package/dist/text/reranker.js.map +0 -1
  199. package/dist/text/tokenizer.d.ts.map +0 -1
  200. package/dist/text/tokenizer.js.map +0 -1
  201. package/dist/types.d.ts.map +0 -1
  202. package/dist/types.js.map +0 -1
@@ -0,0 +1,314 @@
1
+ /**
2
+ * MULTIMODAL IMPLEMENTATION — CLIP Embedder Implementation
3
+ *
4
+ * Implements UniversalEmbedder interface for CLIP models with full multimodal support.
5
+ * Provides reliable text and image embedding using CLIPTextModelWithProjection and
6
+ * CLIPVisionModelWithProjection for true cross-modal search capabilities.
7
+ *
8
+ * Features:
9
+ * - Text embedding using CLIP text encoder (512-dimensional vectors)
10
+ * - Image embedding using CLIP vision encoder (512-dimensional vectors)
11
+ * - Unified embedding space enabling cross-modal similarity search
12
+ * - Text queries can find semantically similar images
13
+ * - Image queries can find semantically similar text
14
+ * - Batch processing optimization for both text and images
15
+ *
16
+ * Supported Models:
17
+ * - Xenova/clip-vit-base-patch32 (recommended, faster)
18
+ * - Xenova/clip-vit-base-patch16 (higher accuracy, slower)
19
+ */
20
+ import { BaseUniversalEmbedder, type EmbedderOptions } from '../core/abstract-embedder.js';
21
+ import type { EmbeddingResult } from '../types.js';
22
+ /**
23
+ * CLIP embedder implementation for multimodal content
24
+ *
25
+ * Provides reliable text and image embedding using separate CLIP model components:
26
+ * - CLIPTextModelWithProjection for text-only embedding (no pixel_values errors)
27
+ * - CLIPVisionModelWithProjection for image embedding
28
+ * - AutoTokenizer for proper text tokenization with CLIP's 77 token limit
29
+ *
30
+ * All embeddings are 512-dimensional vectors in a unified embedding space,
31
+ * enabling true cross-modal search where text queries can find images and
32
+ * image queries can find text based on semantic similarity.
33
+ *
34
+ * Example Usage:
35
+ * ```typescript
36
+ * const embedder = await createEmbedder('Xenova/clip-vit-base-patch32');
37
+ *
38
+ * // Embed text
39
+ * const textResult = await embedder.embedText('a red sports car');
40
+ *
41
+ * // Embed image
42
+ * const imageResult = await embedder.embedImage('./car.jpg');
43
+ *
44
+ * // Calculate cross-modal similarity
45
+ * const similarity = cosineSimilarity(textResult.vector, imageResult.vector);
46
+ * ```
47
+ */
48
+ export declare class CLIPEmbedder extends BaseUniversalEmbedder {
49
+ private tokenizer;
50
+ private textModel;
51
+ private imageModel;
52
+ private resourceManager;
53
+ private embedderResourceId?;
54
+ private tokenizerResourceId?;
55
+ private textModelResourceId?;
56
+ private imageModelResourceId?;
57
+ constructor(modelName: string, options?: EmbedderOptions);
58
+ /**
59
+ * Load the CLIP model components
60
+ *
61
+ * Loads three separate components for reliable multimodal embedding:
62
+ * 1. AutoTokenizer - Handles text tokenization with CLIP's 77 token limit
63
+ * 2. CLIPTextModelWithProjection - Generates text embeddings without pixel_values errors
64
+ * 3. CLIPVisionModelWithProjection - Generates image embeddings
65
+ *
66
+ * All components are registered with the resource manager for proper cleanup.
67
+ * Models are cached locally after first download for faster subsequent loads.
68
+ *
69
+ * @throws {Error} If model loading fails or components are not available
70
+ */
71
+ loadModel(): Promise<void>;
72
+ /**
73
+ * Clean up model resources with comprehensive disposal
74
+ *
75
+ * Properly disposes of all CLIP model components:
76
+ * - Tokenizer resources
77
+ * - Text model resources
78
+ * - Vision model resources
79
+ *
80
+ * Uses the resource manager for coordinated cleanup and forces garbage
81
+ * collection to free memory from CLIP models which can be memory intensive.
82
+ *
83
+ * This method is safe to call multiple times and will not throw errors
84
+ * during cleanup - errors are logged but don't prevent cleanup completion.
85
+ */
86
+ cleanup(): Promise<void>;
87
+ /**
88
+ * Embed text using CLIP text encoder
89
+ *
90
+ * Uses CLIPTextModelWithProjection for reliable text-only embedding without
91
+ * pixel_values errors. Text is tokenized with CLIP's 77 token limit and
92
+ * automatically truncated if necessary.
93
+ *
94
+ * Returns a 512-dimensional embedding vector in the unified CLIP embedding space,
95
+ * which is directly comparable to image embeddings for cross-modal search.
96
+ *
97
+ * @param text - The text to embed (will be trimmed and validated)
98
+ * @returns EmbeddingResult with 512-dimensional vector and metadata
99
+ * @throws {Error} If text is empty, model not loaded, or embedding fails
100
+ *
101
+ * @example
102
+ * ```typescript
103
+ * const result = await embedder.embedText('a red sports car');
104
+ * console.log(result.vector.length); // 512
105
+ * console.log(result.contentType); // 'text'
106
+ * ```
107
+ */
108
+ embedText(text: string): Promise<EmbeddingResult>;
109
+ /**
110
+ * Embed image using CLIP vision encoder
111
+ *
112
+ * Uses CLIPVisionModelWithProjection to generate image embeddings in the same
113
+ * unified embedding space as text embeddings, enabling true cross-modal search.
114
+ *
115
+ * Supports both local file paths and URLs. Images are automatically preprocessed:
116
+ * - Resized to 224x224 pixels (CLIP's expected input size)
117
+ * - Converted to proper pixel_values format using AutoProcessor
118
+ * - Normalized for CLIP vision model
119
+ *
120
+ * Returns a 512-dimensional embedding vector directly comparable to text embeddings.
121
+ *
122
+ * @param imagePath - Local file path or URL to the image
123
+ * @returns EmbeddingResult with 512-dimensional vector and metadata
124
+ * @throws {Error} If image not found, unsupported format, or embedding fails
125
+ *
126
+ * @example
127
+ * ```typescript
128
+ * // Local file
129
+ * const result = await embedder.embedImage('./car.jpg');
130
+ *
131
+ * // URL
132
+ * const result = await embedder.embedImage('https://example.com/car.jpg');
133
+ *
134
+ * console.log(result.vector.length); // 512
135
+ * console.log(result.contentType); // 'image'
136
+ * ```
137
+ *
138
+ * Supported formats: PNG, JPEG, GIF, BMP, WebP
139
+ */
140
+ embedImage(imagePath: string): Promise<EmbeddingResult>;
141
+ /**
142
+ * Load and preprocess image for CLIP vision model
143
+ *
144
+ * Handles image loading from both local files and URLs with automatic format
145
+ * detection and preprocessing. Uses Sharp library when available for better
146
+ * Node.js support, falls back to RawImage for browser compatibility.
147
+ *
148
+ * Preprocessing steps:
149
+ * 1. Load image from path or URL
150
+ * 2. Resize to 224x224 pixels (CLIP's expected input size)
151
+ * 3. Convert to RGB format if needed
152
+ * 4. Return RawImage object for AutoProcessor
153
+ *
154
+ * @param imagePath - Local file path or URL to the image
155
+ * @returns RawImage object ready for AutoProcessor
156
+ * @throws {Error} If image loading or preprocessing fails
157
+ * @private
158
+ */
159
+ private loadAndPreprocessImage;
160
+ /**
161
+ * Optimized batch processing for CLIP models
162
+ *
163
+ * Processes mixed batches of text and image content efficiently using the
164
+ * BatchProcessingOptimizer for memory management and progress tracking.
165
+ *
166
+ * Features:
167
+ * - Automatic separation of text and image items
168
+ * - Memory-efficient processing for large batches
169
+ * - Progress reporting for batches > 20 items
170
+ * - Garbage collection between batches
171
+ * - Detailed statistics logging
172
+ *
173
+ * @param batch - Array of items with content, contentType, and optional metadata
174
+ * @returns Array of EmbeddingResult objects in the same order as input
175
+ * @throws {Error} If batch processing fails
176
+ * @protected
177
+ */
178
+ protected processBatch(batch: Array<{
179
+ content: string;
180
+ contentType: string;
181
+ metadata?: Record<string, any>;
182
+ }>): Promise<EmbeddingResult[]>;
183
+ /**
184
+ * Process batch of text items using CLIPTextModelWithProjection
185
+ *
186
+ * Efficiently processes multiple text items by tokenizing all texts first,
187
+ * then generating embeddings sequentially. This approach balances memory
188
+ * usage with processing speed.
189
+ *
190
+ * @param textItems - Array of text items to process
191
+ * @returns Array of EmbeddingResult objects
192
+ * @throws {Error} If batch processing fails or dimension mismatch occurs
193
+ * @private
194
+ */
195
+ private processBatchText;
196
+ /**
197
+ * Get comprehensive model information including CLIP-specific capabilities
198
+ *
199
+ * Extends base model info with CLIP-specific capabilities including multimodal
200
+ * support, zero-shot classification, and cross-modal retrieval features.
201
+ *
202
+ * @returns Object with model information and capabilities
203
+ */
204
+ getModelInfo(): {
205
+ capabilities: {
206
+ supportsMultimodal: boolean;
207
+ supportsZeroShotClassification: boolean;
208
+ supportsImageTextSimilarity: boolean;
209
+ supportsTextImageRetrieval: boolean;
210
+ recommendedUseCase: string;
211
+ imageEmbeddingStatus: string;
212
+ supportsText: boolean;
213
+ supportsImages: boolean;
214
+ supportsBatchProcessing: boolean;
215
+ supportsMetadata: boolean;
216
+ maxBatchSize?: number;
217
+ maxTextLength?: number;
218
+ supportedImageFormats?: readonly string[];
219
+ supportsCrossModalSearch?: boolean;
220
+ unifiedEmbeddingSpace?: boolean;
221
+ reliableImplementation?: boolean;
222
+ };
223
+ name: string;
224
+ type: import("../core/universal-embedder.js").ModelType;
225
+ dimensions: number;
226
+ version: string;
227
+ supportedContentTypes: readonly string[];
228
+ requirements: import("../types.js").ModelRequirements;
229
+ };
230
+ /**
231
+ * Check if the model is suitable for a specific task
232
+ *
233
+ * CLIP models excel at similarity, classification, retrieval, and multimodal
234
+ * tasks due to their unified embedding space and zero-shot capabilities.
235
+ *
236
+ * @param task - The task type to check
237
+ * @returns true if CLIP is suitable for the task, false otherwise
238
+ */
239
+ isSuitableForTask(task: 'similarity' | 'classification' | 'clustering' | 'retrieval' | 'multimodal'): boolean;
240
+ /**
241
+ * Get information about multimodal capabilities
242
+ *
243
+ * Returns detailed information about what content types are supported and
244
+ * what features are planned for future implementation.
245
+ *
246
+ * @returns Object describing multimodal support status
247
+ */
248
+ getMultimodalCapabilities(): {
249
+ textSupport: boolean;
250
+ imageSupport: boolean;
251
+ videoSupport: boolean;
252
+ audioSupport: boolean;
253
+ plannedFeatures: string[];
254
+ };
255
+ /**
256
+ * Get CLIP model variant information
257
+ *
258
+ * Extracts architecture details from the model name to provide variant-specific
259
+ * configuration parameters like patch size, image size, and text length limits.
260
+ *
261
+ * @returns Object with architecture details
262
+ */
263
+ getModelVariant(): {
264
+ architecture: string;
265
+ patchSize: number;
266
+ imageSize: number;
267
+ textMaxLength: number;
268
+ };
269
+ /**
270
+ * Check if text length is within CLIP's token limit
271
+ *
272
+ * Estimates token count based on character length (rough approximation of
273
+ * ~4 characters per token for English text). CLIP has a hard limit of 77 tokens.
274
+ *
275
+ * @param text - Text to validate
276
+ * @returns true if text is within token limit, false otherwise
277
+ */
278
+ isTextLengthValid(text: string): boolean;
279
+ /**
280
+ * Get performance characteristics for this CLIP variant
281
+ *
282
+ * Provides guidance on speed, accuracy, memory usage, and recommended batch
283
+ * sizes based on the CLIP model variant (patch32 vs patch16).
284
+ *
285
+ * @returns Object with performance characteristics
286
+ */
287
+ getPerformanceInfo(): {
288
+ speed: 'fast' | 'medium' | 'slow';
289
+ accuracy: 'good' | 'better' | 'best';
290
+ memoryUsage: 'low' | 'medium' | 'high';
291
+ recommendedBatchSize: number;
292
+ };
293
+ /**
294
+ * Check if all CLIP model components are loaded
295
+ *
296
+ * Verifies that tokenizer, text model, and vision model are all loaded and
297
+ * ready for use. All three components must be available for the embedder
298
+ * to be considered fully loaded.
299
+ *
300
+ * @returns true if all components are loaded, false otherwise
301
+ */
302
+ isLoaded(): boolean;
303
+ /**
304
+ * Validate that this is a supported CLIP model
305
+ *
306
+ * Checks the model name against the list of supported CLIP models. Currently
307
+ * supports Xenova/clip-vit-base-patch32 and Xenova/clip-vit-base-patch16.
308
+ *
309
+ * @throws {Error} If model is not in the supported list
310
+ * @private
311
+ */
312
+ private validateCLIPModel;
313
+ }
314
+ //# sourceMappingURL=clip-embedder.d.ts.map