n8n-nodes-tembory 1.1.6 → 1.1.8
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.
|
@@ -2270,19 +2270,12 @@ const wrapTemboryMemory = (memory, ctx, memoryKey) => new Proxy(memory, {
|
|
|
2270
2270
|
]);
|
|
2271
2271
|
try {
|
|
2272
2272
|
const response = await target.loadMemoryVariables(values);
|
|
2273
|
-
const cacheHit = Boolean(response.temboryDiagnostics && response.temboryDiagnostics.cacheHit);
|
|
2274
|
-
const chatHistory = cacheHit
|
|
2275
|
-
? [{ cached: true, messages: Array.isArray(response[memoryKey] || response.chatHistory) ? (response[memoryKey] || response.chatHistory).length : 0 }]
|
|
2276
|
-
: snapshotJson(response[memoryKey] || response.chatHistory || []);
|
|
2277
2273
|
const messages = Array.isArray(response[memoryKey] || response.chatHistory) ? (response[memoryKey] || response.chatHistory).length : 0;
|
|
2278
2274
|
ctx.addOutputData(n8n_workflow_1.NodeConnectionTypes.AiMemory, index, [
|
|
2279
2275
|
[{
|
|
2280
2276
|
json: {
|
|
2281
2277
|
action: 'loadMemoryVariables',
|
|
2282
|
-
cached: cacheHit || undefined,
|
|
2283
2278
|
messages,
|
|
2284
|
-
contextQualityScore: response.temboryContextQualityScore,
|
|
2285
|
-
contextStatus: response.temboryContextHealth && response.temboryContextHealth.status,
|
|
2286
2279
|
},
|
|
2287
2280
|
}],
|
|
2288
2281
|
]);
|
|
@@ -2893,24 +2886,6 @@ class TemboryMemory {
|
|
|
2893
2886
|
if (loadCache.has(cacheKey)) {
|
|
2894
2887
|
result = snapshotJson(loadCache.get(cacheKey));
|
|
2895
2888
|
result.response = result.response || {};
|
|
2896
|
-
result.response.temboryDiagnostics = {
|
|
2897
|
-
...(result.response.temboryDiagnostics || {}),
|
|
2898
|
-
cacheHit: true,
|
|
2899
|
-
cacheScope: 'supplyData.loadMemoryVariables',
|
|
2900
|
-
};
|
|
2901
|
-
if (result.response.temboryContext) {
|
|
2902
|
-
result.response.temboryContext = {
|
|
2903
|
-
kind: result.response.temboryContext.kind,
|
|
2904
|
-
userId: result.response.temboryContext.userId,
|
|
2905
|
-
project: result.response.temboryContext.project,
|
|
2906
|
-
query: result.response.temboryContext.query,
|
|
2907
|
-
retrievalMode: result.response.temboryContext.retrievalMode,
|
|
2908
|
-
payloadFormat: result.response.temboryContext.payloadFormat,
|
|
2909
|
-
contextQualityScore: result.response.temboryContext.contextQualityScore,
|
|
2910
|
-
cacheHit: true,
|
|
2911
|
-
};
|
|
2912
|
-
}
|
|
2913
|
-
delete result.response.temboryContextText;
|
|
2914
2889
|
}
|
|
2915
2890
|
else {
|
|
2916
2891
|
result = await TemboryMemory.prototype.loadMemoryVariablesForItem.call(this, itemIndex, inputValues);
|
|
@@ -3907,26 +3882,7 @@ class TemboryMemory {
|
|
|
3907
3882
|
return {
|
|
3908
3883
|
response: {
|
|
3909
3884
|
[memoryKey]: payload,
|
|
3910
|
-
|
|
3911
|
-
temboryContextText: contextText,
|
|
3912
|
-
temborySummary: summary,
|
|
3913
|
-
temboryActiveSummary: loadedActiveSummary,
|
|
3914
|
-
temboryConnectedModelSummary: connectedModelSummary,
|
|
3915
|
-
temboryContextHealth: contextHealth,
|
|
3916
|
-
temboryContextQualityScore: contextHealth.quality_score,
|
|
3917
|
-
temboryWorkingMemory: workingMemory,
|
|
3918
|
-
temboryDecisionState: decisionState,
|
|
3919
|
-
temboryMemoryCompression: memoryCompression,
|
|
3920
|
-
temboryProfileFacts: renderProfileFacts(profileFacts),
|
|
3921
|
-
temboryOperationalState: operationalState,
|
|
3922
|
-
temboryActionLedger: actionLedger,
|
|
3923
|
-
temboryEntityTimeline: entityTimeline,
|
|
3924
|
-
temboryVectorMemories: normalizedVectorMemories,
|
|
3925
|
-
temboryGraph: graph,
|
|
3926
|
-
temboryRecentMessages: recentMessages,
|
|
3927
|
-
temboryRecentHighlights: highlights,
|
|
3928
|
-
temboryToolHistory: audit.toolHistory,
|
|
3929
|
-
temboryDiagnostics: diagnostics,
|
|
3885
|
+
chatHistory: payload,
|
|
3930
3886
|
},
|
|
3931
3887
|
};
|
|
3932
3888
|
}
|
package/package.json
CHANGED