@vivantel/virage-core 0.2.15 → 0.2.16
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.
- package/README.md +8 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ interface FileChunker {
|
|
|
42
42
|
interface EmbeddingProvider {
|
|
43
43
|
name: string;
|
|
44
44
|
dimensions: number;
|
|
45
|
-
model?: string;
|
|
45
|
+
model?: string; // used for cache invalidation
|
|
46
46
|
embed(text: string): Promise<number[]>;
|
|
47
47
|
embedBatch?(texts: string[]): Promise<number[][]>;
|
|
48
48
|
}
|
|
@@ -64,13 +64,18 @@ import { createChunker } from "@vivantel/virage-core";
|
|
|
64
64
|
import { markdownHeadersStrategy } from "@vivantel/virage-strategies";
|
|
65
65
|
|
|
66
66
|
// Strategy shorthand
|
|
67
|
-
createChunker({
|
|
67
|
+
createChunker({
|
|
68
|
+
patterns: ["docs/**/*.md"],
|
|
69
|
+
strategy: markdownHeadersStrategy(),
|
|
70
|
+
});
|
|
68
71
|
|
|
69
72
|
// Custom process function
|
|
70
73
|
createChunker({
|
|
71
74
|
name: "custom",
|
|
72
75
|
patterns: ["**/*.txt"],
|
|
73
|
-
process: async (content, filePath, commitHash) => [
|
|
76
|
+
process: async (content, filePath, commitHash) => [
|
|
77
|
+
{ content, metadata: {}, sourceFile: filePath, commitHash },
|
|
78
|
+
],
|
|
74
79
|
});
|
|
75
80
|
```
|
|
76
81
|
|