@kortexya/reasoninglayer 0.14.0 → 0.15.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/index.cjs +48 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +294 -99
- package/dist/index.d.ts +294 -99
- package/dist/index.js +48 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
// src/config.ts
|
|
4
|
-
var SDK_VERSION = "0.
|
|
4
|
+
var SDK_VERSION = "0.15.2";
|
|
5
5
|
function resolveConfig(config) {
|
|
6
6
|
if (!config.baseUrl) {
|
|
7
7
|
throw new Error("ClientConfig.baseUrl is required");
|
|
@@ -2427,17 +2427,18 @@ var Ingestion = class {
|
|
|
2427
2427
|
...params
|
|
2428
2428
|
});
|
|
2429
2429
|
/**
|
|
2430
|
-
*
|
|
2430
|
+
* @description Defaults to async dispatch: returns `202` with a session id and the pipeline runs in a background tokio task. Pass `?sync=true` to run the whole pipeline inside the request and get a `201` with the full result — suitable only for small ontologies because the embedding loop dominates wall time on large inputs.
|
|
2431
2431
|
*
|
|
2432
2432
|
* @tags ingestion
|
|
2433
2433
|
* @name IngestRdf
|
|
2434
|
-
* @summary Ingest RDF/OWL/SHACL data and convert to OSF
|
|
2434
|
+
* @summary Ingest RDF/OWL/SHACL data and convert to OSF.
|
|
2435
2435
|
* @request POST:/api/v1/ingest/rdf
|
|
2436
2436
|
* @secure
|
|
2437
2437
|
*/
|
|
2438
|
-
ingestRdf = (data, params = {}) => this.http.request({
|
|
2438
|
+
ingestRdf = (query, data, params = {}) => this.http.request({
|
|
2439
2439
|
path: `/api/v1/ingest/rdf`,
|
|
2440
2440
|
method: "POST",
|
|
2441
|
+
query,
|
|
2441
2442
|
body: data,
|
|
2442
2443
|
secure: true,
|
|
2443
2444
|
type: "application/json" /* Json */,
|
|
@@ -13208,24 +13209,25 @@ function PipelineQualityStatsDtoFromApiToFront(dto) {
|
|
|
13208
13209
|
axiomsDeduplicated: dto.axioms_deduplicated,
|
|
13209
13210
|
dynamicConfigEntityThreshold: dto.dynamic_config_entity_threshold,
|
|
13210
13211
|
dynamicConfigRelationThreshold: dto.dynamic_config_relation_threshold,
|
|
13211
|
-
|
|
13212
|
-
|
|
13213
|
-
|
|
13214
|
-
fcaSortsCreated: dto.fca_sorts_created,
|
|
13212
|
+
entitiesRejected: dto.entities_rejected,
|
|
13213
|
+
entitiesSortCorrected: dto.entities_sort_corrected,
|
|
13214
|
+
entitiesValidated: dto.entities_validated,
|
|
13215
13215
|
feedbackAxiomsLearned: dto.feedback_axioms_learned,
|
|
13216
13216
|
feedbackPipelineAdjustments: dto.feedback_pipeline_adjustments,
|
|
13217
|
+
forwardChainingIssues: dto.forward_chaining_issues,
|
|
13218
|
+
fullyValid: dto.fully_valid,
|
|
13217
13219
|
hybridIntraBatchDeduped: dto.hybrid_intra_batch_deduped,
|
|
13220
|
+
incompleteEntities: dto.incomplete_entities,
|
|
13221
|
+
inconsistentSorts: dto.inconsistent_sorts,
|
|
13222
|
+
inferenceIterations: dto.inference_iterations,
|
|
13218
13223
|
inferenceRelationsDeduped: dto.inference_relations_deduped,
|
|
13219
13224
|
inferenceRulesApplied: dto.inference_rules_applied,
|
|
13220
13225
|
inferenceRulesFilteredLowConfidence: dto.inference_rules_filtered_low_confidence,
|
|
13221
13226
|
inferenceRulesInvalidScopeSort: dto.inference_rules_invalid_scope_sort,
|
|
13222
13227
|
inferenceRulesTotal: dto.inference_rules_total,
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
osfForwardChainingIssues: dto.osf_forward_chaining_issues,
|
|
13227
|
-
osfFullyValid: dto.osf_fully_valid,
|
|
13228
|
-
osfIncompleteEntities: dto.osf_incomplete_entities
|
|
13228
|
+
patternRulesPersisted: dto.pattern_rules_persisted,
|
|
13229
|
+
relationsFromInferenceRules: dto.relations_from_inference_rules,
|
|
13230
|
+
relationsInferred: dto.relations_inferred
|
|
13229
13231
|
};
|
|
13230
13232
|
}
|
|
13231
13233
|
function TokenUsageDtoFromApiToFront(dto) {
|
|
@@ -13484,8 +13486,8 @@ function DocumentProgressDtoFromApiToFront(dto) {
|
|
|
13484
13486
|
extractionStrategy: dto.extraction_strategy,
|
|
13485
13487
|
inferenceRulesApplied: dto.inference_rules_applied,
|
|
13486
13488
|
modelName: dto.model_name,
|
|
13487
|
-
|
|
13488
|
-
|
|
13489
|
+
residuationsCreated: dto.residuations_created,
|
|
13490
|
+
residuationsResumed: dto.residuations_resumed,
|
|
13489
13491
|
referencesResolved: dto.references_resolved,
|
|
13490
13492
|
referencesUnresolved: dto.references_unresolved,
|
|
13491
13493
|
relationsExtracted: dto.relations_extracted,
|
|
@@ -13495,7 +13497,6 @@ function DocumentProgressDtoFromApiToFront(dto) {
|
|
|
13495
13497
|
sortNames: dto.sort_names,
|
|
13496
13498
|
sortsCreated: dto.sorts_created,
|
|
13497
13499
|
sortsReused: dto.sorts_reused,
|
|
13498
|
-
sortsReusedGlb: dto.sorts_reused_glb,
|
|
13499
13500
|
sortsReusedSemantic: dto.sorts_reused_semantic,
|
|
13500
13501
|
startedAt: dto.started_at,
|
|
13501
13502
|
stepLog: dto.step_log.map(StepLogEntryDtoFromApiToFront),
|
|
@@ -13780,7 +13781,10 @@ var IngestionClient = class {
|
|
|
13780
13781
|
* @returns Created sorts and terms from the RDF data.
|
|
13781
13782
|
*/
|
|
13782
13783
|
async ingestRdf(request) {
|
|
13783
|
-
const response = await this.api.ingestRdf(
|
|
13784
|
+
const response = await this.api.ingestRdf(
|
|
13785
|
+
{ sync: request.sync ?? false },
|
|
13786
|
+
IngestRdfRequestFromFrontToApi(request)
|
|
13787
|
+
);
|
|
13784
13788
|
return IngestRdfResponseFromApiToFront(response.data);
|
|
13785
13789
|
}
|
|
13786
13790
|
/**
|
|
@@ -15470,7 +15474,10 @@ function SearchStatsDtoFromApiToFront(dto) {
|
|
|
15470
15474
|
nodesPruned: dto.nodes_pruned,
|
|
15471
15475
|
backtracks: dto.backtracks,
|
|
15472
15476
|
solveTimeMs: dto.solve_time_ms,
|
|
15473
|
-
scorerCalls: dto.scorer_calls
|
|
15477
|
+
scorerCalls: dto.scorer_calls,
|
|
15478
|
+
restarts: dto.restarts,
|
|
15479
|
+
learnedClauses: dto.learned_clauses,
|
|
15480
|
+
forcedChoices: dto.forced_choices?.map(ChoiceSelectionFromApiToFront)
|
|
15474
15481
|
};
|
|
15475
15482
|
}
|
|
15476
15483
|
function SpaceSearchRequestFromFrontToApi(model) {
|
|
@@ -15478,11 +15485,32 @@ function SpaceSearchRequestFromFrontToApi(model) {
|
|
|
15478
15485
|
strategy: model.strategy,
|
|
15479
15486
|
max_solutions: model.maxSolutions,
|
|
15480
15487
|
collect_traces: model.collectTraces,
|
|
15481
|
-
use_neural_guidance: model.useNeuralGuidance
|
|
15488
|
+
use_neural_guidance: model.useNeuralGuidance,
|
|
15489
|
+
mode: model.mode
|
|
15490
|
+
};
|
|
15491
|
+
}
|
|
15492
|
+
function VariableFeasibilityDtoFromApiToFront(dto) {
|
|
15493
|
+
return {
|
|
15494
|
+
canBeTrue: dto.can_be_true,
|
|
15495
|
+
canBeFalse: dto.can_be_false,
|
|
15496
|
+
verified: dto.verified ?? true
|
|
15482
15497
|
};
|
|
15483
15498
|
}
|
|
15484
15499
|
function SpaceSearchResponseFromApiToFront(dto) {
|
|
15500
|
+
if (dto.kind === "feasibility") {
|
|
15501
|
+
return {
|
|
15502
|
+
kind: "feasibility",
|
|
15503
|
+
variables: Object.fromEntries(
|
|
15504
|
+
Object.entries(dto.variables).map(([name, v]) => [
|
|
15505
|
+
name,
|
|
15506
|
+
VariableFeasibilityDtoFromApiToFront(v)
|
|
15507
|
+
])
|
|
15508
|
+
),
|
|
15509
|
+
searchStats: dto.search_stats ? SearchStatsDtoFromApiToFront(dto.search_stats) : dto.search_stats
|
|
15510
|
+
};
|
|
15511
|
+
}
|
|
15485
15512
|
return {
|
|
15513
|
+
kind: "solutions",
|
|
15486
15514
|
solutions: dto.solutions.map(SpaceSolutionDtoFromApiToFront),
|
|
15487
15515
|
count: dto.count,
|
|
15488
15516
|
searchStats: dto.search_stats ? SearchStatsDtoFromApiToFront(dto.search_stats) : dto.search_stats
|