@zabaca/lattice 0.1.0 → 0.1.2
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/dist/cli.js +13 -13
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1315,7 +1315,7 @@ class EmbeddingService {
|
|
|
1315
1315
|
switch (this.config.provider) {
|
|
1316
1316
|
case "openai":
|
|
1317
1317
|
if (!this.config.apiKey) {
|
|
1318
|
-
throw new Error("OPENAI_API_KEY environment variable is required for embeddings. " + "Set it in
|
|
1318
|
+
throw new Error("OPENAI_API_KEY environment variable is required for embeddings. " + "Set it in .env or use --no-embeddings to skip embedding generation.");
|
|
1319
1319
|
}
|
|
1320
1320
|
return new OpenAIEmbeddingProvider({
|
|
1321
1321
|
apiKey: this.config.apiKey,
|
|
@@ -1326,7 +1326,7 @@ class EmbeddingService {
|
|
|
1326
1326
|
return new MockEmbeddingProvider(this.config.dimensions);
|
|
1327
1327
|
case "voyage":
|
|
1328
1328
|
if (!this.config.apiKey) {
|
|
1329
|
-
throw new Error("VOYAGE_API_KEY environment variable is required for embeddings. " + "Set it in
|
|
1329
|
+
throw new Error("VOYAGE_API_KEY environment variable is required for embeddings. " + "Set it in .env or use --no-embeddings to skip embedding generation.");
|
|
1330
1330
|
}
|
|
1331
1331
|
return new VoyageEmbeddingProvider({
|
|
1332
1332
|
apiKey: this.config.apiKey,
|
|
@@ -2154,7 +2154,7 @@ function registerSyncCommand(program) {
|
|
|
2154
2154
|
};
|
|
2155
2155
|
try {
|
|
2156
2156
|
app = await NestFactory.createApplicationContext(AppModule, {
|
|
2157
|
-
logger: options.verbose ? ["log", "error", "warn"] :
|
|
2157
|
+
logger: options.verbose ? ["log", "error", "warn"] : ["error"]
|
|
2158
2158
|
});
|
|
2159
2159
|
const sync = app.get(SyncService);
|
|
2160
2160
|
if (options.watch && options.dryRun) {
|
|
@@ -2288,7 +2288,7 @@ function registerStatusCommand(program) {
|
|
|
2288
2288
|
let app;
|
|
2289
2289
|
try {
|
|
2290
2290
|
app = await NestFactory2.createApplicationContext(AppModule, {
|
|
2291
|
-
logger:
|
|
2291
|
+
logger: ["error"]
|
|
2292
2292
|
});
|
|
2293
2293
|
const sync = app.get(SyncService);
|
|
2294
2294
|
const manifest = app.get(ManifestService);
|
|
@@ -2335,7 +2335,7 @@ function registerStatusCommand(program) {
|
|
|
2335
2335
|
`);
|
|
2336
2336
|
} else {
|
|
2337
2337
|
console.log(`Total: ${pendingCount} document(s) need syncing`);
|
|
2338
|
-
console.log("\uD83D\uDCA1 Run `
|
|
2338
|
+
console.log("\uD83D\uDCA1 Run `lattice sync` to apply changes\n");
|
|
2339
2339
|
}
|
|
2340
2340
|
await app.close();
|
|
2341
2341
|
process.exit(0);
|
|
@@ -2354,7 +2354,7 @@ function registerQueryCommands(program) {
|
|
|
2354
2354
|
let app;
|
|
2355
2355
|
try {
|
|
2356
2356
|
app = await NestFactory3.createApplicationContext(AppModule, {
|
|
2357
|
-
logger:
|
|
2357
|
+
logger: ["error"]
|
|
2358
2358
|
});
|
|
2359
2359
|
const graph = app.get(GraphService);
|
|
2360
2360
|
const stats = await graph.getStats();
|
|
@@ -2389,7 +2389,7 @@ Relationship Types (${stats.relationshipTypes.length}):`);
|
|
|
2389
2389
|
let app;
|
|
2390
2390
|
try {
|
|
2391
2391
|
app = await NestFactory3.createApplicationContext(AppModule, {
|
|
2392
|
-
logger:
|
|
2392
|
+
logger: ["error"]
|
|
2393
2393
|
});
|
|
2394
2394
|
const graph = app.get(GraphService);
|
|
2395
2395
|
if (options.semantic) {
|
|
@@ -2427,7 +2427,7 @@ Relationship Types (${stats.relationshipTypes.length}):`);
|
|
|
2427
2427
|
if (errorMsg.includes("no embeddings") || errorMsg.includes("vector")) {
|
|
2428
2428
|
console.log(`
|
|
2429
2429
|
Note: Semantic search requires embeddings to be generated first.`);
|
|
2430
|
-
console.log(`Run '
|
|
2430
|
+
console.log(`Run 'lattice sync' to generate embeddings for documents.
|
|
2431
2431
|
`);
|
|
2432
2432
|
}
|
|
2433
2433
|
await app.close();
|
|
@@ -2486,7 +2486,7 @@ Note: Semantic search requires embeddings to be generated first.`);
|
|
|
2486
2486
|
let app;
|
|
2487
2487
|
try {
|
|
2488
2488
|
app = await NestFactory3.createApplicationContext(AppModule, {
|
|
2489
|
-
logger:
|
|
2489
|
+
logger: ["error"]
|
|
2490
2490
|
});
|
|
2491
2491
|
const graph = app.get(GraphService);
|
|
2492
2492
|
const escapedName = name.replace(/'/g, "\\'");
|
|
@@ -2539,7 +2539,7 @@ Note: Semantic search requires embeddings to be generated first.`);
|
|
|
2539
2539
|
let app;
|
|
2540
2540
|
try {
|
|
2541
2541
|
app = await NestFactory3.createApplicationContext(AppModule, {
|
|
2542
|
-
logger:
|
|
2542
|
+
logger: ["error"]
|
|
2543
2543
|
});
|
|
2544
2544
|
const graph = app.get(GraphService);
|
|
2545
2545
|
const result = await graph.query(query);
|
|
@@ -2561,7 +2561,7 @@ Note: Semantic search requires embeddings to be generated first.`);
|
|
|
2561
2561
|
let app;
|
|
2562
2562
|
try {
|
|
2563
2563
|
app = await NestFactory3.createApplicationContext(AppModule, {
|
|
2564
|
-
logger:
|
|
2564
|
+
logger: ["error"]
|
|
2565
2565
|
});
|
|
2566
2566
|
const graph = app.get(GraphService);
|
|
2567
2567
|
const pathResolver = app.get(PathResolverService);
|
|
@@ -2616,7 +2616,7 @@ function registerValidateCommand(program) {
|
|
|
2616
2616
|
let app;
|
|
2617
2617
|
try {
|
|
2618
2618
|
app = await NestFactory4.createApplicationContext(AppModule, {
|
|
2619
|
-
logger:
|
|
2619
|
+
logger: ["error"]
|
|
2620
2620
|
});
|
|
2621
2621
|
const parser = app.get(DocumentParserService);
|
|
2622
2622
|
console.log(`Validating entities and relationships...
|
|
@@ -2683,7 +2683,7 @@ function registerOntologyCommand(program) {
|
|
|
2683
2683
|
let app;
|
|
2684
2684
|
try {
|
|
2685
2685
|
app = await NestFactory5.createApplicationContext(AppModule, {
|
|
2686
|
-
logger:
|
|
2686
|
+
logger: ["error"]
|
|
2687
2687
|
});
|
|
2688
2688
|
const ontologyService = app.get(OntologyService);
|
|
2689
2689
|
const ontology = await ontologyService.deriveOntology();
|