@carlonicora/nestjs-neo4jsonapi 1.118.0 → 1.119.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.
- package/dist/agents/contextualiser/contexts/contextualiser.context.d.ts +30 -0
- package/dist/agents/contextualiser/contexts/contextualiser.context.d.ts.map +1 -1
- package/dist/agents/contextualiser/contexts/notebook.context.d.ts +10 -0
- package/dist/agents/contextualiser/contexts/notebook.context.d.ts.map +1 -1
- package/dist/agents/contextualiser/contexts/notebook.context.js +2 -0
- package/dist/agents/contextualiser/contexts/notebook.context.js.map +1 -1
- package/dist/agents/contextualiser/contextualiser.module.d.ts.map +1 -1
- package/dist/agents/contextualiser/contextualiser.module.js +4 -2
- package/dist/agents/contextualiser/contextualiser.module.js.map +1 -1
- package/dist/agents/contextualiser/interfaces/contextualiser.response.interface.d.ts +2 -4
- package/dist/agents/contextualiser/interfaces/contextualiser.response.interface.d.ts.map +1 -1
- package/dist/agents/contextualiser/interfaces/retrieval.source.interface.d.ts +38 -0
- package/dist/agents/contextualiser/interfaces/retrieval.source.interface.d.ts.map +1 -0
- package/dist/agents/contextualiser/interfaces/retrieval.source.interface.js +8 -0
- package/dist/agents/contextualiser/interfaces/retrieval.source.interface.js.map +1 -0
- package/dist/agents/contextualiser/nodes/chunk.node.service.d.ts +3 -1
- package/dist/agents/contextualiser/nodes/chunk.node.service.d.ts.map +1 -1
- package/dist/agents/contextualiser/nodes/chunk.node.service.js +12 -2
- package/dist/agents/contextualiser/nodes/chunk.node.service.js.map +1 -1
- package/dist/agents/contextualiser/nodes/chunk.vector.node.service.d.ts +4 -1
- package/dist/agents/contextualiser/nodes/chunk.vector.node.service.d.ts.map +1 -1
- package/dist/agents/contextualiser/nodes/chunk.vector.node.service.js +59 -12
- package/dist/agents/contextualiser/nodes/chunk.vector.node.service.js.map +1 -1
- package/dist/agents/contextualiser/nodes/keyconcepts.node.service.js +1 -1
- package/dist/agents/contextualiser/nodes/keyconcepts.node.service.js.map +1 -1
- package/dist/agents/contextualiser/services/contextualiser.service.d.ts +11 -1
- package/dist/agents/contextualiser/services/contextualiser.service.d.ts.map +1 -1
- package/dist/agents/contextualiser/services/contextualiser.service.js +25 -4
- package/dist/agents/contextualiser/services/contextualiser.service.js.map +1 -1
- package/dist/agents/drift/drift.module.d.ts.map +1 -1
- package/dist/agents/drift/drift.module.js +9 -2
- package/dist/agents/drift/drift.module.js.map +1 -1
- package/dist/agents/graph.creator/interfaces/chunk.analysis.interface.d.ts +3 -0
- package/dist/agents/graph.creator/interfaces/chunk.analysis.interface.d.ts.map +1 -1
- package/dist/agents/graph.creator/services/graph.creator.service.d.ts +11 -0
- package/dist/agents/graph.creator/services/graph.creator.service.d.ts.map +1 -1
- package/dist/agents/graph.creator/services/graph.creator.service.js +12 -1
- package/dist/agents/graph.creator/services/graph.creator.service.js.map +1 -1
- package/dist/agents/index.d.ts +5 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +4 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/prompts/index.d.ts +3 -1
- package/dist/agents/prompts/index.d.ts.map +1 -1
- package/dist/agents/prompts/index.js +8 -2
- package/dist/agents/prompts/index.js.map +1 -1
- package/dist/agents/responder/contexts/responder.context.d.ts +102 -0
- package/dist/agents/responder/contexts/responder.context.d.ts.map +1 -1
- package/dist/agents/responder/contexts/responder.context.js +2 -0
- package/dist/agents/responder/contexts/responder.context.js.map +1 -1
- package/dist/agents/responder/interfaces/responder.response.interface.d.ts +4 -0
- package/dist/agents/responder/interfaces/responder.response.interface.d.ts.map +1 -1
- package/dist/agents/responder/interfaces/unified.trace.interface.d.ts +13 -0
- package/dist/agents/responder/interfaces/unified.trace.interface.d.ts.map +1 -1
- package/dist/agents/responder/nodes/planner.node.service.d.ts +6 -2
- package/dist/agents/responder/nodes/planner.node.service.d.ts.map +1 -1
- package/dist/agents/responder/nodes/planner.node.service.js +10 -5
- package/dist/agents/responder/nodes/planner.node.service.js.map +1 -1
- package/dist/agents/responder/nodes/responder.answer.node.service.d.ts +6 -0
- package/dist/agents/responder/nodes/responder.answer.node.service.d.ts.map +1 -1
- package/dist/agents/responder/nodes/responder.answer.node.service.js +12 -1
- package/dist/agents/responder/nodes/responder.answer.node.service.js.map +1 -1
- package/dist/agents/responder/responder.module.d.ts.map +1 -1
- package/dist/agents/responder/responder.module.js +6 -2
- package/dist/agents/responder/responder.module.js.map +1 -1
- package/dist/agents/responder/services/responder.service.d.ts +20 -1
- package/dist/agents/responder/services/responder.service.d.ts.map +1 -1
- package/dist/agents/responder/services/responder.service.js +61 -4
- package/dist/agents/responder/services/responder.service.js.map +1 -1
- package/dist/agents/summariser/services/summariser.service.d.ts +1 -0
- package/dist/agents/summariser/services/summariser.service.d.ts.map +1 -1
- package/dist/agents/summariser/services/summariser.service.js +20 -1
- package/dist/agents/summariser/services/summariser.service.js.map +1 -1
- package/dist/agents/summariser/utils/tldr.sanitizer.d.ts +18 -0
- package/dist/agents/summariser/utils/tldr.sanitizer.d.ts.map +1 -0
- package/dist/agents/summariser/utils/tldr.sanitizer.js +44 -0
- package/dist/agents/summariser/utils/tldr.sanitizer.js.map +1 -0
- package/dist/common/interfaces/agents/graph.creator.interface.d.ts +10 -4
- package/dist/common/interfaces/agents/graph.creator.interface.d.ts.map +1 -1
- package/dist/config/base.config.d.ts +6 -0
- package/dist/config/base.config.d.ts.map +1 -1
- package/dist/config/base.config.js +2 -0
- package/dist/config/base.config.js.map +1 -1
- package/dist/config/interfaces/base.config.interface.d.ts +4 -0
- package/dist/config/interfaces/base.config.interface.d.ts.map +1 -1
- package/dist/config/interfaces/config.prompts.interface.d.ts +1 -0
- package/dist/config/interfaces/config.prompts.interface.d.ts.map +1 -1
- package/dist/config/interfaces/config.responder.interface.d.ts +21 -0
- package/dist/config/interfaces/config.responder.interface.d.ts.map +1 -0
- package/dist/config/interfaces/config.responder.interface.js +3 -0
- package/dist/config/interfaces/config.responder.interface.js.map +1 -0
- package/dist/config/interfaces/config.summariser.interface.d.ts +21 -0
- package/dist/config/interfaces/config.summariser.interface.d.ts.map +1 -0
- package/dist/config/interfaces/config.summariser.interface.js +3 -0
- package/dist/config/interfaces/config.summariser.interface.js.map +1 -0
- package/dist/config/interfaces/index.d.ts +2 -0
- package/dist/config/interfaces/index.d.ts.map +1 -1
- package/dist/config/interfaces/index.js +2 -0
- package/dist/config/interfaces/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -94,6 +94,16 @@ export declare const ContextualiserContext: import("@langchain/langgraph").Annot
|
|
|
94
94
|
(): import("@langchain/langgraph").LastValue<string>;
|
|
95
95
|
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
96
96
|
};
|
|
97
|
+
sourceLayer: {
|
|
98
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
99
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
100
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
101
|
+
};
|
|
102
|
+
metadata: {
|
|
103
|
+
(annotation: import("@langchain/langgraph").SingleReducer<Record<string, unknown>, Record<string, unknown>>): import("@langchain/langgraph").BaseChannel<Record<string, unknown>, Record<string, unknown> | import("@langchain/langgraph").OverwriteValue<Record<string, unknown>>, unknown>;
|
|
104
|
+
(): import("@langchain/langgraph").LastValue<Record<string, unknown>>;
|
|
105
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
106
|
+
};
|
|
97
107
|
}>[], import("@langchain/langgraph").StateType<{
|
|
98
108
|
chunkId: {
|
|
99
109
|
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
@@ -110,6 +120,16 @@ export declare const ContextualiserContext: import("@langchain/langgraph").Annot
|
|
|
110
120
|
(): import("@langchain/langgraph").LastValue<string>;
|
|
111
121
|
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
112
122
|
};
|
|
123
|
+
sourceLayer: {
|
|
124
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
125
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
126
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
127
|
+
};
|
|
128
|
+
metadata: {
|
|
129
|
+
(annotation: import("@langchain/langgraph").SingleReducer<Record<string, unknown>, Record<string, unknown>>): import("@langchain/langgraph").BaseChannel<Record<string, unknown>, Record<string, unknown> | import("@langchain/langgraph").OverwriteValue<Record<string, unknown>>, unknown>;
|
|
130
|
+
(): import("@langchain/langgraph").LastValue<Record<string, unknown>>;
|
|
131
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
132
|
+
};
|
|
113
133
|
}>[] | import("@langchain/langgraph").OverwriteValue<import("@langchain/langgraph").StateType<{
|
|
114
134
|
chunkId: {
|
|
115
135
|
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
@@ -126,6 +146,16 @@ export declare const ContextualiserContext: import("@langchain/langgraph").Annot
|
|
|
126
146
|
(): import("@langchain/langgraph").LastValue<string>;
|
|
127
147
|
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
128
148
|
};
|
|
149
|
+
sourceLayer: {
|
|
150
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
151
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
152
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
153
|
+
};
|
|
154
|
+
metadata: {
|
|
155
|
+
(annotation: import("@langchain/langgraph").SingleReducer<Record<string, unknown>, Record<string, unknown>>): import("@langchain/langgraph").BaseChannel<Record<string, unknown>, Record<string, unknown> | import("@langchain/langgraph").OverwriteValue<Record<string, unknown>>, unknown>;
|
|
156
|
+
(): import("@langchain/langgraph").LastValue<Record<string, unknown>>;
|
|
157
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
158
|
+
};
|
|
129
159
|
}>[]>, unknown>;
|
|
130
160
|
chunkLevel: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
|
|
131
161
|
queuedChunks: import("@langchain/langgraph").BaseChannel<string[], string[] | import("@langchain/langgraph").OverwriteValue<string[]>, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextualiser.context.d.ts","sourceRoot":"","sources":["../../../../src/agents/contextualiser/contexts/contextualiser.context.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"contextualiser.context.d.ts","sourceRoot":"","sources":["../../../../src/agents/contextualiser/contexts/contextualiser.context.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0LhC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,OAAO,qBAAqB,CAAC,KAAK,CAAC"}
|
|
@@ -14,5 +14,15 @@ export declare const NotebookContext: import("@langchain/langgraph").AnnotationR
|
|
|
14
14
|
(): import("@langchain/langgraph").LastValue<string>;
|
|
15
15
|
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
16
16
|
};
|
|
17
|
+
sourceLayer: {
|
|
18
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
19
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
20
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
21
|
+
};
|
|
22
|
+
metadata: {
|
|
23
|
+
(annotation: import("@langchain/langgraph").SingleReducer<Record<string, unknown>, Record<string, unknown>>): import("@langchain/langgraph").BaseChannel<Record<string, unknown>, Record<string, unknown> | import("@langchain/langgraph").OverwriteValue<Record<string, unknown>>, unknown>;
|
|
24
|
+
(): import("@langchain/langgraph").LastValue<Record<string, unknown>>;
|
|
25
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
26
|
+
};
|
|
17
27
|
}>;
|
|
18
28
|
//# sourceMappingURL=notebook.context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notebook.context.d.ts","sourceRoot":"","sources":["../../../../src/agents/contextualiser/contexts/notebook.context.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"notebook.context.d.ts","sourceRoot":"","sources":["../../../../src/agents/contextualiser/contexts/notebook.context.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;EAM1B,CAAC"}
|
|
@@ -6,5 +6,7 @@ exports.NotebookContext = langgraph_1.Annotation.Root({
|
|
|
6
6
|
chunkId: (langgraph_1.Annotation),
|
|
7
7
|
content: (langgraph_1.Annotation),
|
|
8
8
|
reason: (langgraph_1.Annotation),
|
|
9
|
+
sourceLayer: (langgraph_1.Annotation),
|
|
10
|
+
metadata: (langgraph_1.Annotation),
|
|
9
11
|
});
|
|
10
12
|
//# sourceMappingURL=notebook.context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notebook.context.js","sourceRoot":"","sources":["../../../../src/agents/contextualiser/contexts/notebook.context.ts"],"names":[],"mappings":";;;AAAA,oDAAkD;AAErC,QAAA,eAAe,GAAG,sBAAU,CAAC,IAAI,CAAC;IAC7C,OAAO,EAAE,CAAA,sBAAkB,CAAA;IAC3B,OAAO,EAAE,CAAA,sBAAkB,CAAA;IAC3B,MAAM,EAAE,CAAA,sBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"notebook.context.js","sourceRoot":"","sources":["../../../../src/agents/contextualiser/contexts/notebook.context.ts"],"names":[],"mappings":";;;AAAA,oDAAkD;AAErC,QAAA,eAAe,GAAG,sBAAU,CAAC,IAAI,CAAC;IAC7C,OAAO,EAAE,CAAA,sBAAkB,CAAA;IAC3B,OAAO,EAAE,CAAA,sBAAkB,CAAA;IAC3B,MAAM,EAAE,CAAA,sBAAkB,CAAA;IAC1B,WAAW,EAAE,CAAA,sBAAkB,CAAA;IAC/B,QAAQ,EAAE,CAAA,sBAAmC,CAAA;CAC9C,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextualiser.module.d.ts","sourceRoot":"","sources":["../../../src/agents/contextualiser/contextualiser.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contextualiser.module.d.ts","sourceRoot":"","sources":["../../../src/agents/contextualiser/contextualiser.module.ts"],"names":[],"mappings":"AAkBA,qBAca,oBAAoB;CAAG"}
|
|
@@ -19,7 +19,9 @@ const contextualiser_service_1 = require("./services/contextualiser.service");
|
|
|
19
19
|
const llm_module_1 = require("../../core/llm/llm.module");
|
|
20
20
|
const atomicfact_module_1 = require("../../foundations/atomicfact/atomicfact.module");
|
|
21
21
|
const chunk_module_1 = require("../../foundations/chunk/chunk.module");
|
|
22
|
-
|
|
22
|
+
// NOTE: CompanyModule is deliberately NOT imported — see the note in
|
|
23
|
+
// responder.module.ts. Nothing here injects CompanyService/CompanyRepository,
|
|
24
|
+
// and importing it would mount CompanyController into every consumer.
|
|
23
25
|
const keyconcept_module_1 = require("../../foundations/keyconcept/keyconcept.module");
|
|
24
26
|
const s3_module_1 = require("../../foundations/s3/s3.module");
|
|
25
27
|
let ContextualiserModule = class ContextualiserModule {
|
|
@@ -27,7 +29,7 @@ let ContextualiserModule = class ContextualiserModule {
|
|
|
27
29
|
exports.ContextualiserModule = ContextualiserModule;
|
|
28
30
|
exports.ContextualiserModule = ContextualiserModule = __decorate([
|
|
29
31
|
(0, common_1.Module)({
|
|
30
|
-
imports: [llm_module_1.LLMModule, s3_module_1.S3Module,
|
|
32
|
+
imports: [llm_module_1.LLMModule, s3_module_1.S3Module, atomicfact_module_1.AtomicFactModule, keyconcept_module_1.KeyConceptModule, chunk_module_1.ChunkModule],
|
|
31
33
|
providers: [
|
|
32
34
|
contextualiser_context_factory_1.ContextualiserContextFactoryService,
|
|
33
35
|
contextualiser_service_1.ContextualiserService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextualiser.module.js","sourceRoot":"","sources":["../../../src/agents/contextualiser/contextualiser.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+FAAiG;AACjG,+EAA0E;AAC1E,mEAA8D;AAC9D,iFAA2E;AAC3E,+EAA0E;AAC1E,yFAAmF;AACnF,yEAAoE;AACpE,8EAA0E;AAC1E,0DAAsD;AACtD,sFAAkF;AAClF,uEAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"contextualiser.module.js","sourceRoot":"","sources":["../../../src/agents/contextualiser/contextualiser.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+FAAiG;AACjG,+EAA0E;AAC1E,mEAA8D;AAC9D,iFAA2E;AAC3E,+EAA0E;AAC1E,yFAAmF;AACnF,yEAAoE;AACpE,8EAA0E;AAC1E,0DAAsD;AACtD,sFAAkF;AAClF,uEAAmE;AACnE,qEAAqE;AACrE,8EAA8E;AAC9E,sEAAsE;AACtE,sFAAkF;AAClF,8DAA0D;AAgBnD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAAG,CAAA;AAAvB,oDAAoB;+BAApB,oBAAoB;IAdhC,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,sBAAS,EAAE,oBAAQ,EAAE,oCAAgB,EAAE,oCAAgB,EAAE,0BAAW,CAAC;QAC/E,SAAS,EAAE;YACT,oEAAmC;YACnC,8CAAqB;YACrB,iDAAsB;YACtB,qCAAgB;YAChB,iDAAsB;YACtB,2CAAmB;YACnB,0DAA0B;YAC1B,kDAAsB;SACvB;QACD,OAAO,EAAE,CAAC,oEAAmC,EAAE,8CAAqB,CAAC;KACtE,CAAC;GACW,oBAAoB,CAAG"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { AgentMessageType } from "../../../common/enums/agentmessage.type";
|
|
2
2
|
import { TokenUsageInterface } from "../../../common/interfaces/token.usage.interface";
|
|
3
|
+
import { NotebookContext } from "../contexts/notebook.context";
|
|
3
4
|
export interface ContextualiserResponseInterface {
|
|
4
5
|
type: AgentMessageType;
|
|
5
6
|
rationalPlan: string;
|
|
6
7
|
annotations: string;
|
|
7
|
-
notebook:
|
|
8
|
-
chunkId: string;
|
|
9
|
-
content: string;
|
|
10
|
-
}[];
|
|
8
|
+
notebook: (typeof NotebookContext.State)[];
|
|
11
9
|
processedElements: {
|
|
12
10
|
keyConcepts: string[];
|
|
13
11
|
atomicFacts: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextualiser.response.interface.d.ts","sourceRoot":"","sources":["../../../../src/agents/contextualiser/interfaces/contextualiser.response.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;
|
|
1
|
+
{"version":3,"file":"contextualiser.response.interface.d.ts","sourceRoot":"","sources":["../../../../src/agents/contextualiser/interfaces/contextualiser.response.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,gBAAgB,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IAGpB,QAAQ,EAAE,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;IAC3C,iBAAiB,EAAE;QACjB,WAAW,EAAE,MAAM,EAAE,CAAC;QACtB,WAAW,EAAE,MAAM,EAAE,CAAC;QACtB,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;IACF,OAAO,EAAE;QACP,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;KACnB,EAAE,CAAC;IACJ,QAAQ,EAAE;QACR,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,GAAG,CAAC;KAClB,EAAE,CAAC;IACJ,MAAM,EAAE,mBAAmB,CAAC;CAC7B"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DataLimits } from "../../../common/types/data.limits";
|
|
2
|
+
/**
|
|
3
|
+
* A single retrieved item contributed by an app-side retrieval source.
|
|
4
|
+
* The package treats `content` and `metadata` as opaque: whatever the app puts
|
|
5
|
+
* there is carried, unchanged, into the notebook and (later) into the responder
|
|
6
|
+
* sources payload.
|
|
7
|
+
*/
|
|
8
|
+
export interface RetrievalSourceEntry {
|
|
9
|
+
/** id of the retrieved item (chunk id or app-side id) */
|
|
10
|
+
chunkId: string;
|
|
11
|
+
/** text handed to the answer synthesiser (may carry an app-chosen prefix) */
|
|
12
|
+
content: string;
|
|
13
|
+
reason: string;
|
|
14
|
+
/** app-defined provenance tag; package default is "case" */
|
|
15
|
+
sourceLayer?: string;
|
|
16
|
+
/** opaque app payload, carried through to ResponderResponseInterface.sources */
|
|
17
|
+
metadata?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
/** Everything the contextualiser knows about the current turn when it fans out retrieval. */
|
|
20
|
+
export interface RetrievalSourceContext {
|
|
21
|
+
question: string;
|
|
22
|
+
rationalPlan: string;
|
|
23
|
+
companyId: string;
|
|
24
|
+
dataLimits: DataLimits;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Contract for app-contributed retrieval sources.
|
|
28
|
+
* Called in parallel with the package's own vector search; a rejected promise is
|
|
29
|
+
* logged and treated as an empty contribution so one bad source cannot fail the turn.
|
|
30
|
+
*/
|
|
31
|
+
export interface RetrievalSourceContribution {
|
|
32
|
+
search(ctx: RetrievalSourceContext): Promise<RetrievalSourceEntry[]>;
|
|
33
|
+
}
|
|
34
|
+
/** Multi-provider DI token: consuming apps contribute RetrievalSourceContribution instances. */
|
|
35
|
+
export declare const RETRIEVAL_SOURCES: unique symbol;
|
|
36
|
+
/** Multi-provider DI token: consuming apps contribute DynamicStructuredTool[] to the chunk node. */
|
|
37
|
+
export declare const CONTEXTUALISER_TOOLS: unique symbol;
|
|
38
|
+
//# sourceMappingURL=retrieval.source.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieval.source.interface.d.ts","sourceRoot":"","sources":["../../../../src/agents/contextualiser/interfaces/retrieval.source.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,6FAA6F;AAC7F,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,MAAM,CAAC,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAAC;CACtE;AAED,gGAAgG;AAChG,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAE7D,oGAAoG;AACpG,eAAO,MAAM,oBAAoB,eAAiC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONTEXTUALISER_TOOLS = exports.RETRIEVAL_SOURCES = void 0;
|
|
4
|
+
/** Multi-provider DI token: consuming apps contribute RetrievalSourceContribution instances. */
|
|
5
|
+
exports.RETRIEVAL_SOURCES = Symbol("RETRIEVAL_SOURCES");
|
|
6
|
+
/** Multi-provider DI token: consuming apps contribute DynamicStructuredTool[] to the chunk node. */
|
|
7
|
+
exports.CONTEXTUALISER_TOOLS = Symbol("CONTEXTUALISER_TOOLS");
|
|
8
|
+
//# sourceMappingURL=retrieval.source.interface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieval.source.interface.js","sourceRoot":"","sources":["../../../../src/agents/contextualiser/interfaces/retrieval.source.interface.ts"],"names":[],"mappings":";;;AAqCA,gGAAgG;AACnF,QAAA,iBAAiB,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAE7D,oGAAoG;AACvF,QAAA,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DynamicStructuredTool } from "@langchain/core/tools";
|
|
1
2
|
import { ConfigService } from "@nestjs/config";
|
|
2
3
|
import { ClsService } from "nestjs-cls";
|
|
3
4
|
import { BaseConfigInterface } from "../../../config/interfaces";
|
|
@@ -12,9 +13,10 @@ export declare class ChunkNodeService {
|
|
|
12
13
|
private readonly webSocketService;
|
|
13
14
|
private readonly clsService;
|
|
14
15
|
private readonly configService;
|
|
16
|
+
private readonly contributedTools?;
|
|
15
17
|
private readonly logger;
|
|
16
18
|
private readonly systemPrompt;
|
|
17
|
-
constructor(llmService: LLMService, chunkRepository: ChunkRepository, webSocketService: WebSocketService, clsService: ClsService, configService: ConfigService<BaseConfigInterface
|
|
19
|
+
constructor(llmService: LLMService, chunkRepository: ChunkRepository, webSocketService: WebSocketService, clsService: ClsService, configService: ConfigService<BaseConfigInterface>, contributedTools?: DynamicStructuredTool[]);
|
|
18
20
|
execute(params: {
|
|
19
21
|
state: typeof ContextualiserContext.State;
|
|
20
22
|
}): Promise<Partial<ContextualiserContextState>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk.node.service.d.ts","sourceRoot":"","sources":["../../../../src/agents/contextualiser/nodes/chunk.node.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk.node.service.d.ts","sourceRoot":"","sources":["../../../../src/agents/contextualiser/nodes/chunk.node.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGxC,OAAO,EAAE,mBAAmB,EAA0B,MAAM,4BAA4B,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAC3F,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,sDAAsD,CAAC;AAI9D,eAAO,MAAM,kBAAkB,ksHAoC9B,CAAC;AAgCF,qBACa,gBAAgB;IAKzB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAG9B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAXpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqC;IAC5D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;gBAGnB,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAGjD,gBAAgB,CAAC,EAAE,qBAAqB,EAAE;IAMvD,OAAO,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,OAAO,qBAAqB,CAAC,KAAK,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;CA0KnH"}
|
|
@@ -8,6 +8,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
11
14
|
var ChunkNodeService_1;
|
|
12
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
16
|
exports.ChunkNodeService = exports.defaultChunkPrompt = void 0;
|
|
@@ -18,6 +21,7 @@ const zod_1 = require("zod");
|
|
|
18
21
|
const llm_service_1 = require("../../../core/llm/services/llm.service");
|
|
19
22
|
const websocket_service_1 = require("../../../core/websocket/services/websocket.service");
|
|
20
23
|
const chunk_repository_1 = require("../../../foundations/chunk/repositories/chunk.repository");
|
|
24
|
+
const retrieval_source_interface_1 = require("../interfaces/retrieval.source.interface");
|
|
21
25
|
exports.defaultChunkPrompt = `
|
|
22
26
|
As an intelligent assistant, your primary objective is to assess a specific **text chunk** and determine whether the available information suffices to answer the question.
|
|
23
27
|
|
|
@@ -82,12 +86,13 @@ const inputSchema = zod_1.z.object({
|
|
|
82
86
|
text: zod_1.z.string().describe("The content of the text you must analyse to provide an answer to the user question"),
|
|
83
87
|
});
|
|
84
88
|
let ChunkNodeService = ChunkNodeService_1 = class ChunkNodeService {
|
|
85
|
-
constructor(llmService, chunkRepository, webSocketService, clsService, configService) {
|
|
89
|
+
constructor(llmService, chunkRepository, webSocketService, clsService, configService, contributedTools) {
|
|
86
90
|
this.llmService = llmService;
|
|
87
91
|
this.chunkRepository = chunkRepository;
|
|
88
92
|
this.webSocketService = webSocketService;
|
|
89
93
|
this.clsService = clsService;
|
|
90
94
|
this.configService = configService;
|
|
95
|
+
this.contributedTools = contributedTools;
|
|
91
96
|
this.logger = new common_1.Logger(ChunkNodeService_1.name);
|
|
92
97
|
const prompts = this.configService.get("prompts");
|
|
93
98
|
this.systemPrompt = prompts?.contextualiser?.chunk ?? exports.defaultChunkPrompt;
|
|
@@ -134,6 +139,7 @@ let ChunkNodeService = ChunkNodeService_1 = class ChunkNodeService {
|
|
|
134
139
|
outputSchema: outputSchema,
|
|
135
140
|
systemPrompts: [this.systemPrompt],
|
|
136
141
|
temperature: 0.1,
|
|
142
|
+
...(this.contributedTools?.length ? { tools: this.contributedTools } : {}),
|
|
137
143
|
});
|
|
138
144
|
if (params.state.contentType === "Conversation")
|
|
139
145
|
await this.webSocketService.sendMessageToUser(this.clsService.get("userId"), "contextualiser", {
|
|
@@ -165,6 +171,8 @@ let ChunkNodeService = ChunkNodeService_1 = class ChunkNodeService {
|
|
|
165
171
|
chunkId: llmResponse.chunkId,
|
|
166
172
|
content: llmResponse.note.content,
|
|
167
173
|
reason: llmResponse.note.reason,
|
|
174
|
+
sourceLayer: "case",
|
|
175
|
+
metadata: undefined,
|
|
168
176
|
});
|
|
169
177
|
if (!statuses.includes(llmResponse.status) && !params.state.status.includes(llmResponse.status))
|
|
170
178
|
statuses.push(llmResponse.status);
|
|
@@ -228,10 +236,12 @@ let ChunkNodeService = ChunkNodeService_1 = class ChunkNodeService {
|
|
|
228
236
|
exports.ChunkNodeService = ChunkNodeService;
|
|
229
237
|
exports.ChunkNodeService = ChunkNodeService = ChunkNodeService_1 = __decorate([
|
|
230
238
|
(0, common_1.Injectable)(),
|
|
239
|
+
__param(5, (0, common_1.Optional)()),
|
|
240
|
+
__param(5, (0, common_1.Inject)(retrieval_source_interface_1.CONTEXTUALISER_TOOLS)),
|
|
231
241
|
__metadata("design:paramtypes", [llm_service_1.LLMService,
|
|
232
242
|
chunk_repository_1.ChunkRepository,
|
|
233
243
|
websocket_service_1.WebSocketService,
|
|
234
244
|
nestjs_cls_1.ClsService,
|
|
235
|
-
config_1.ConfigService])
|
|
245
|
+
config_1.ConfigService, Array])
|
|
236
246
|
], ChunkNodeService);
|
|
237
247
|
//# sourceMappingURL=chunk.node.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk.node.service.js","sourceRoot":"","sources":["../../../../src/agents/contextualiser/nodes/chunk.node.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk.node.service.js","sourceRoot":"","sources":["../../../../src/agents/contextualiser/nodes/chunk.node.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,2CAAsE;AACtE,2CAA+C;AAC/C,2CAAwC;AACxC,6BAAwB;AAGxB,wEAAoE;AACpE,0FAAsF;AAEtF,+FAA2F;AAM3F,yFAAgF;AAEnE,QAAA,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCjC,CAAC;AAEF,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,MAAM,EAAE,OAAC;SACN,MAAM,EAAE;SACR,QAAQ,CACP,yNAAyN,CAC1N;IACH,IAAI,EAAE,OAAC;SACJ,MAAM,CAAC;QACN,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oEAAoE,CAAC;QAClG,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sEAAsE,CAAC;KACpG,CAAC;SACD,QAAQ,CAAC,mGAAmG,CAAC;IAChH,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;SACrB,QAAQ,CAAC;;;;;;CAMb,CAAC;CACD,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IAC/D,YAAY,EAAE,OAAC;SACZ,MAAM,EAAE;SACR,QAAQ,CAAC,uFAAuF,CAAC;IACp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IAAI,kBAAkB,EAAE,CAAC;YACtD,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC;YAC5B,QAAQ,GAAG,QAAQ,CAAC;QACtB,CAAC;QAED,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;QAE3C,OAAO;YACL,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,kBAAkB;YAC5B,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC;YACvC,eAAe,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACxC,YAAY,EAAE,gBAAgB;YAC9B,QAAQ,EAAE,QAAQ;YAClB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;YAC3C,MAAM,EAAE,SAAS;SAClB,CAAC;IACJ,CAAC;CACF,CAAA;AA5LY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAWR,WAAA,IAAA,iBAAQ,GAAE,CAAA;IACV,WAAA,IAAA,eAAM,EAAC,iDAAoB,CAAC,CAAA;qCANA,wBAAU;QACL,kCAAe;QACd,oCAAgB;QACtB,uBAAU;QACP,sBAAa;GATpC,gBAAgB,CA4L5B"}
|
|
@@ -5,6 +5,7 @@ import { LLMService } from "../../../core/llm/services/llm.service";
|
|
|
5
5
|
import { WebSocketService } from "../../../core/websocket/services/websocket.service";
|
|
6
6
|
import { ChunkRepository } from "../../../foundations/chunk/repositories/chunk.repository";
|
|
7
7
|
import { ContextualiserContext, ContextualiserContextState } from "../../contextualiser/contexts/contextualiser.context";
|
|
8
|
+
import { RetrievalSourceContribution } from "../interfaces/retrieval.source.interface";
|
|
8
9
|
export declare const defaultChunkVectorPrompt = "\nAs an intelligent assistant, your primary objective is to assess a specific **text chunk** and determine whether the available information suffices to answer the question.\n\nGiven the **question**, and the **rational plan** to answer the question you have to:\n1. Write a note summarizing the key points from the current text chunk that are relevant to the question. This must be used as context to answer the question.\n - The note should contain all the information required to provide a detailed answer\n - It should be a comprehensive note that can be used to generate a precise, contextualise reponse to the question, containing all the required details enough to cover all relevant aspects.\n\n2. Write a reason describing how the text chunk is relevant to the question\n - The reason should explain why the text chunk is relevant or not to answer the question.\n\n3. Select the appropriate next action to take based on your assessment of the current information.\n - **queuePreviousChunk**: Choose this action if you feel that the current chunk of text might have relevant information in a previous text chunk that would **significantly** enhance your answer.\n - **queueNextChunk**: Choose this action if you feel that the current chunk of text might have relevant information in a subsequent text chunk that would **significantly** enhance your answer.\n - **readNeighbouringNodes**: Choose this action if you believe that this text chunk does not contain relevant information and that exploring neighbouring chunks could provide valuable context.\n - **answer**: Choose this action if you believe that the information in this text chunk is sufficient to provide a **comprehensive and accurate** answer to the question.\n\n 4. **Provide a Status Message**:\n - Write a **short, friendly message** (maximum 40 characters) about your action.\n - **Avoid technical terms** such as \"nodes\", \"atomic facts\", or \"key concepts\".\n - The status message should make the user understand the action being taken\n - The status message **MUST** contain clear information contextualised to the current question and the gathered information.\n - The status message should be specific to the context and clearly convey the next steps or actions being taken.\n - The status message **MUST NOT** be something unrelated to the text, such as \"success\", \"sufficient information\", \"insufficient information\", \"chunk analysed\", \"chunk processed\" or similar generic messages.\n \n ### Important Notes:\n - **Proceed to Answer When Appropriate**: If the current information is sufficient to provide a reliable answer, do not hesitate to proceed to select **answer** as the next step.\n - **Gather More Information When Needed**: If you identify gaps or uncertainties that could be addressed by additional information, choose the appropriate action to gather that information.\n - **Use Judgment in Decision-Making**: Apply thoughtful consideration to decide whether additional information is necessary.\n - If the content contains acronyms and their definition, include the definition of the acronym in your answer.\n \n### **Please strictly follow the above instructions and format. Let's begin.**\n";
|
|
9
10
|
export declare class ChunkVectorNodeService {
|
|
10
11
|
private readonly llmService;
|
|
@@ -12,8 +13,10 @@ export declare class ChunkVectorNodeService {
|
|
|
12
13
|
private readonly webSocketService;
|
|
13
14
|
private readonly clsService;
|
|
14
15
|
private readonly configService;
|
|
16
|
+
private readonly retrievalSources?;
|
|
17
|
+
private readonly logger;
|
|
15
18
|
private readonly systemPrompt;
|
|
16
|
-
constructor(llmService: LLMService, chunkRepository: ChunkRepository, webSocketService: WebSocketService, clsService: ClsService, configService: ConfigService<BaseConfigInterface
|
|
19
|
+
constructor(llmService: LLMService, chunkRepository: ChunkRepository, webSocketService: WebSocketService, clsService: ClsService, configService: ConfigService<BaseConfigInterface>, retrievalSources?: RetrievalSourceContribution[]);
|
|
17
20
|
execute(params: {
|
|
18
21
|
state: typeof ContextualiserContext.State;
|
|
19
22
|
}): Promise<Partial<ContextualiserContextState>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk.vector.node.service.d.ts","sourceRoot":"","sources":["../../../../src/agents/contextualiser/nodes/chunk.vector.node.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGxC,OAAO,EAAE,mBAAmB,EAA0B,MAAM,4BAA4B,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAC3F,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,sDAAsD,CAAC;AAE9D,eAAO,MAAM,wBAAwB,6pGAgCpC,CAAC;AA+BF,qBACa,sBAAsB;
|
|
1
|
+
{"version":3,"file":"chunk.vector.node.service.d.ts","sourceRoot":"","sources":["../../../../src/agents/contextualiser/nodes/chunk.vector.node.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGxC,OAAO,EAAE,mBAAmB,EAA0B,MAAM,4BAA4B,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAC3F,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,sDAAsD,CAAC;AAE9D,OAAO,EAAqB,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAI1G,eAAO,MAAM,wBAAwB,6pGAgCpC,CAAC;AA+BF,qBACa,sBAAsB;IAK/B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAG9B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAXpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2C;IAClE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;gBAGnB,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAGjD,gBAAgB,CAAC,EAAE,2BAA2B,EAAE;IAM7D,OAAO,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,OAAO,qBAAqB,CAAC,KAAK,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;CAmInH"}
|
|
@@ -8,6 +8,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var ChunkVectorNodeService_1;
|
|
11
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
16
|
exports.ChunkVectorNodeService = exports.defaultChunkVectorPrompt = void 0;
|
|
13
17
|
const common_1 = require("@nestjs/common");
|
|
@@ -17,6 +21,8 @@ const zod_1 = require("zod");
|
|
|
17
21
|
const llm_service_1 = require("../../../core/llm/services/llm.service");
|
|
18
22
|
const websocket_service_1 = require("../../../core/websocket/services/websocket.service");
|
|
19
23
|
const chunk_repository_1 = require("../../../foundations/chunk/repositories/chunk.repository");
|
|
24
|
+
const retrieval_source_interface_1 = require("../interfaces/retrieval.source.interface");
|
|
25
|
+
const NEIGHBOR_WINDOW = 1;
|
|
20
26
|
exports.defaultChunkVectorPrompt = `
|
|
21
27
|
As an intelligent assistant, your primary objective is to assess a specific **text chunk** and determine whether the available information suffices to answer the question.
|
|
22
28
|
|
|
@@ -75,24 +81,52 @@ const inputSchema = zod_1.z.object({
|
|
|
75
81
|
.describe("The rational plan you designed to provide a comprehensive answer to the user question"),
|
|
76
82
|
text: zod_1.z.string().describe("The content of the text you must analyse to provide an answer to the user question"),
|
|
77
83
|
});
|
|
78
|
-
let ChunkVectorNodeService = class ChunkVectorNodeService {
|
|
79
|
-
constructor(llmService, chunkRepository, webSocketService, clsService, configService) {
|
|
84
|
+
let ChunkVectorNodeService = ChunkVectorNodeService_1 = class ChunkVectorNodeService {
|
|
85
|
+
constructor(llmService, chunkRepository, webSocketService, clsService, configService, retrievalSources) {
|
|
80
86
|
this.llmService = llmService;
|
|
81
87
|
this.chunkRepository = chunkRepository;
|
|
82
88
|
this.webSocketService = webSocketService;
|
|
83
89
|
this.clsService = clsService;
|
|
84
90
|
this.configService = configService;
|
|
91
|
+
this.retrievalSources = retrievalSources;
|
|
92
|
+
this.logger = new common_1.Logger(ChunkVectorNodeService_1.name);
|
|
85
93
|
const prompts = this.configService.get("prompts");
|
|
86
94
|
this.systemPrompt = prompts?.contextualiser?.chunkVector ?? exports.defaultChunkVectorPrompt;
|
|
87
95
|
}
|
|
88
96
|
async execute(params) {
|
|
89
|
-
const chunks = await
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
const [chunks, contributed] = await Promise.all([
|
|
98
|
+
this.chunkRepository.findPotentialChunks({
|
|
99
|
+
question: params.state.question,
|
|
100
|
+
dataLimits: params.state.limits,
|
|
101
|
+
}),
|
|
102
|
+
Promise.all((this.retrievalSources ?? []).map((source) => source
|
|
103
|
+
.search({
|
|
104
|
+
question: params.state.question,
|
|
105
|
+
rationalPlan: params.state.rationalPlan,
|
|
106
|
+
companyId: params.state.companyId,
|
|
107
|
+
dataLimits: params.state.limits,
|
|
108
|
+
})
|
|
109
|
+
.catch((e) => {
|
|
110
|
+
this.logger.warn(`retrieval source contribution failed: ${e.message}`);
|
|
111
|
+
return [];
|
|
112
|
+
}))).then((lists) => lists.flat()),
|
|
113
|
+
]);
|
|
114
|
+
// Neighbour-window widening: each retrieved chunk is analysed together with the
|
|
115
|
+
// chunks immediately before/after it, so the LLM sees continuous prose.
|
|
116
|
+
const allRetrievedIds = chunks.map((c) => c.id);
|
|
117
|
+
const neighborRecords = allRetrievedIds.length
|
|
118
|
+
? await this.chunkRepository.findChunkNeighbors({ chunkIds: allRetrievedIds, window: NEIGHBOR_WINDOW })
|
|
119
|
+
: [];
|
|
120
|
+
const neighborById = new Map(neighborRecords.map((n) => [n.chunkId, n]));
|
|
121
|
+
const widen = (id, content) => {
|
|
122
|
+
const n = neighborById.get(id);
|
|
123
|
+
if (!n)
|
|
124
|
+
return content;
|
|
125
|
+
return [...n.before, content, ...n.after].join("\n\n");
|
|
126
|
+
};
|
|
127
|
+
if (chunks.length === 0 && contributed.length === 0) {
|
|
128
|
+
this.logger.log("chunk_vector: no results — continuing per rational plan routing");
|
|
129
|
+
return {};
|
|
96
130
|
}
|
|
97
131
|
const llmResponses = (await Promise.all(chunks.map(async (chunk) => {
|
|
98
132
|
if (!chunk.content || chunk.content.trim() === "")
|
|
@@ -100,7 +134,7 @@ let ChunkVectorNodeService = class ChunkVectorNodeService {
|
|
|
100
134
|
const inputParams = {
|
|
101
135
|
rationalPlan: params.state.rationalPlan,
|
|
102
136
|
question: params.state.question,
|
|
103
|
-
text: chunk.content,
|
|
137
|
+
text: widen(chunk.id, chunk.content),
|
|
104
138
|
};
|
|
105
139
|
const llmResponse = await this.llmService.call({
|
|
106
140
|
inputSchema: inputSchema,
|
|
@@ -138,6 +172,8 @@ let ChunkVectorNodeService = class ChunkVectorNodeService {
|
|
|
138
172
|
chunkId: llmResponse.chunkId,
|
|
139
173
|
content: llmResponse.note.content,
|
|
140
174
|
reason: llmResponse.note.reason,
|
|
175
|
+
sourceLayer: "case",
|
|
176
|
+
metadata: undefined,
|
|
141
177
|
});
|
|
142
178
|
if (llmResponse.status &&
|
|
143
179
|
!statuses.includes(llmResponse.status) &&
|
|
@@ -145,6 +181,15 @@ let ChunkVectorNodeService = class ChunkVectorNodeService {
|
|
|
145
181
|
statuses.push(llmResponse.status);
|
|
146
182
|
}
|
|
147
183
|
}
|
|
184
|
+
for (const entry of contributed) {
|
|
185
|
+
newNotebookEntries.push({
|
|
186
|
+
chunkId: entry.chunkId,
|
|
187
|
+
content: entry.content,
|
|
188
|
+
reason: entry.reason,
|
|
189
|
+
sourceLayer: entry.sourceLayer ?? "case",
|
|
190
|
+
metadata: entry.metadata,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
148
193
|
return {
|
|
149
194
|
hops: params.state.hops + 1,
|
|
150
195
|
processedChunks: chunks.map((c) => c.id),
|
|
@@ -155,12 +200,14 @@ let ChunkVectorNodeService = class ChunkVectorNodeService {
|
|
|
155
200
|
}
|
|
156
201
|
};
|
|
157
202
|
exports.ChunkVectorNodeService = ChunkVectorNodeService;
|
|
158
|
-
exports.ChunkVectorNodeService = ChunkVectorNodeService = __decorate([
|
|
203
|
+
exports.ChunkVectorNodeService = ChunkVectorNodeService = ChunkVectorNodeService_1 = __decorate([
|
|
159
204
|
(0, common_1.Injectable)(),
|
|
205
|
+
__param(5, (0, common_1.Optional)()),
|
|
206
|
+
__param(5, (0, common_1.Inject)(retrieval_source_interface_1.RETRIEVAL_SOURCES)),
|
|
160
207
|
__metadata("design:paramtypes", [llm_service_1.LLMService,
|
|
161
208
|
chunk_repository_1.ChunkRepository,
|
|
162
209
|
websocket_service_1.WebSocketService,
|
|
163
210
|
nestjs_cls_1.ClsService,
|
|
164
|
-
config_1.ConfigService])
|
|
211
|
+
config_1.ConfigService, Array])
|
|
165
212
|
], ChunkVectorNodeService);
|
|
166
213
|
//# sourceMappingURL=chunk.vector.node.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk.vector.node.service.js","sourceRoot":"","sources":["../../../../src/agents/contextualiser/nodes/chunk.vector.node.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk.vector.node.service.js","sourceRoot":"","sources":["../../../../src/agents/contextualiser/nodes/chunk.vector.node.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAsE;AACtE,2CAA+C;AAC/C,2CAAwC;AACxC,6BAAwB;AAGxB,wEAAoE;AACpE,0FAAsF;AACtF,+FAA2F;AAM3F,yFAA0G;AAE1G,MAAM,eAAe,GAAG,CAAC,CAAC;AAEb,QAAA,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCvC,CAAC;AAEF,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,MAAM,EAAE,OAAC;SACN,MAAM,EAAE;SACR,QAAQ,CACP,yNAAyN,CAC1N;IACH,IAAI,EAAE,OAAC;SACJ,MAAM,CAAC;QACN,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QA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KeyConceptsNodeService_1 = class KeyConceptsNodeSer
|
|
|
92
92
|
`(question="${params.state.question}" howToMode=${!!params.state.limits.howToMode} ` +
|
|
93
93
|
`limitToHowToId=${params.state.limits.limitToHowToId ?? "none"})`);
|
|
94
94
|
}
|
|
95
|
-
else if (params.state.nextStep === "
|
|
95
|
+
else if (params.state.nextStep === "neighbouring_nodes") {
|
|
96
96
|
params.state.neighbouringAlreadyExplored = true;
|
|
97
97
|
keyConcepts = await this.keyConceptRepository.findNeighboursByKeyConcepts({
|
|
98
98
|
keyConcepts: params.state.processedKeyConcepts,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyconcepts.node.service.js","sourceRoot":"","sources":["../../../../src/agents/contextualiser/nodes/keyconcepts.node.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,2CAA+C;AAC/C,2CAAwC;AACxC,6BAAwB;AAExB,wEAAoE;AACpE,0FAAsF;AAEtF,8GAA0G;AAM7F,QAAA,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BvC,CAAC;AAEF,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,MAAM,EAAE,OAAC;SACN,MAAM,EAAE;SACR,QAAQ,CACP,wNAAwN,CACzN;IACH,WAAW,EAAE,OAAC;SACX,KAAK,CACJ,OAAC,CAAC,MAAM,CAAC;QACP,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;QACjE,KAAK,EAAE,OAAC;aACL,MAAM,EAAE;aACR,QAAQ,CACP,iMAAiM,CAClM;QACH,cAAc,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,+DAA+D,CAAC;KACtG,CAAC,CACH;SACA,QAAQ,CAAC,uDAAuD,CAAC;CACrE,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B,QAAQ,EAAE,OAAC,C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rE,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ;gBAC/B,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM;aAChC,CAAC,CAAC;YACH,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,8BAA8B,WAAW,CAAC,MAAM,YAAY;gBAC1D,cAAc,MAAM,CAAC,KAAK,CAAC,QAAQ,eAAe,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG;gBACpF,kBAAkB,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,IAAI,MAAM,GAAG,CACpE,CAAC;QACJ,CAAC;aAAM,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,KAAK,
|
|
1
|
+
{"version":3,"file":"keyconcepts.node.service.js","sourceRoot":"","sources":["../../../../src/agents/contextualiser/nodes/keyconcepts.node.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,2CAA+C;AAC/C,2CAAwC;AACxC,6BAAwB;AAExB,wEAAoE;AACpE,0FAAsF;AAEtF,8GAA0G;AAM7F,QAAA,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BvC,CAAC;AAEF,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,MAAM,EAAE,OAAC;SACN,MAAM,EAAE;SACR,QAAQ,CACP,wNAAwN,CACzN;IACH,WAAW,EAAE,OAAC;SACX,KAAK,CACJ,OAAC,CAAC,MAAM,CAAC;QACP,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;QACjE,KAAK,EAAE,OAAC;aACL,MAAM,EAAE;aACR,QAAQ,CACP,iMAAiM,CAClM;QACH,cAAc,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,+DAA+D,CAAC;KACtG,CAAC,CACH;SACA,QAAQ,CAAC,uDAAuD,CAAC;CACrE,CAAC,CAAC;AAEH,M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