feat: semantic search (1/n)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham
2025-10-05 19:50:52 -04:00
parent f14260b2ba
commit f533902c75
23 changed files with 2955 additions and 502 deletions

View File

@@ -1,6 +1,18 @@
import { QuartzConfig } from "./quartz/cfg"
import { GlobalConfiguration, QuartzConfig } from "./quartz/cfg"
import * as Plugin from "./quartz/plugins"
const semanticSearch: GlobalConfiguration["semanticSearch"] = {
enable: true,
model: "onnx-community/embeddinggemma-300m-ONNX",
aot: true,
dims: 768,
dtype: "fp32",
shardSizeRows: 1024,
hnsw: { M: 16, efConstruction: 200 },
chunking: { chunkSize: 256, chunkOverlap: 64 },
vllm: { enable: true, concurrency: 16, batchSize: 128 },
}
/**
* Quartz 4 Configuration
*
@@ -52,6 +64,7 @@ const config: QuartzConfig = {
},
},
},
semanticSearch,
},
plugins: {
transformers: [
@@ -84,6 +97,7 @@ const config: QuartzConfig = {
enableSiteMap: true,
enableRSS: true,
}),
Plugin.SemanticIndex(semanticSearch),
Plugin.Assets(),
Plugin.Static(),
Plugin.Favicon(),