n8n-nodes-tembory 1.0.55 → 1.0.57
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.
|
@@ -2706,11 +2706,9 @@ class Mem0Memory {
|
|
|
2706
2706
|
options: [
|
|
2707
2707
|
{ name: 'Operacional Estruturado', value: 'basic', description: 'Usa estado da thread, histórico de tools, mensagens recentes e resumo ativo, sem busca vetorial' },
|
|
2708
2708
|
{ name: 'Resumo', value: 'summary', description: 'Retorna um resumo simples em texto' },
|
|
2709
|
-
{ name: 'Semântico (v1)', value: 'semantic', description: 'Busca semântica usando o endpoint v1 com opção de rerank' },
|
|
2710
|
-
{ name: 'Semântico (v2)', value: 'semanticV2', description: 'Busca semântica avançada com filtros (v2)' },
|
|
2711
|
-
{ name: 'Híbrido', value: 'hybrid', description: 'Combina memórias recentes com busca semântica (v2) usando time-decay e pontuação híbrida' },
|
|
2712
2709
|
],
|
|
2713
2710
|
default: 'basic',
|
|
2711
|
+
description: 'Modos expostos para produção. Workflows antigos com semantic/hybrid continuam compatíveis, mas são tratados como operacional estruturado enquanto a memória vetorial estiver desligada.',
|
|
2714
2712
|
},
|
|
2715
2713
|
{
|
|
2716
2714
|
displayName: 'Consulta',
|
|
@@ -3437,13 +3435,14 @@ class Mem0Memory {
|
|
|
3437
3435
|
async loadMemoryVariablesForItem(itemIndex, inputValues = {}) {
|
|
3438
3436
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
3439
3437
|
const memoryKey = this.getNodeParameter('memoryKey', itemIndex);
|
|
3440
|
-
const
|
|
3438
|
+
const requestedRetrievalMode = this.getNodeParameter('retrievalMode', itemIndex);
|
|
3441
3439
|
let payloadFormat = this.getNodeParameter('payloadFormat', itemIndex, 'structured');
|
|
3442
3440
|
const threadId = this.getNodeParameter('threadId', itemIndex);
|
|
3443
3441
|
const project = this.getNodeParameter('project', itemIndex, '');
|
|
3444
3442
|
const adv = applyOperationalPreset(readAdvancedOptions(this, itemIndex));
|
|
3445
3443
|
payloadFormat = adv.payloadFormat || payloadFormat;
|
|
3446
3444
|
const vectorMemoryEnabled = adv.useVectorMemory !== false;
|
|
3445
|
+
const retrievalMode = vectorMemoryEnabled ? requestedRetrievalMode : 'basic';
|
|
3447
3446
|
const backendPersistenceEnabled = adv.persistBackendMemories !== false;
|
|
3448
3447
|
const store = getMemoryStore(this);
|
|
3449
3448
|
const key = userKeyFrom(threadId, adv, project);
|
|
@@ -3482,6 +3481,7 @@ class Mem0Memory {
|
|
|
3482
3481
|
this.logger?.debug('Tembory loading memory variables before model invocation', {
|
|
3483
3482
|
itemIndex,
|
|
3484
3483
|
retrievalMode,
|
|
3484
|
+
requestedRetrievalMode,
|
|
3485
3485
|
hasQuery: String(query || '').trim().length > 0,
|
|
3486
3486
|
connectedAi,
|
|
3487
3487
|
});
|
|
@@ -3965,6 +3965,7 @@ class Mem0Memory {
|
|
|
3965
3965
|
project: project || undefined,
|
|
3966
3966
|
query,
|
|
3967
3967
|
retrievalMode,
|
|
3968
|
+
requestedRetrievalMode: requestedRetrievalMode === retrievalMode ? undefined : requestedRetrievalMode,
|
|
3968
3969
|
payloadFormat,
|
|
3969
3970
|
options: {
|
|
3970
3971
|
includeContextHeader: adv.includeContextHeader !== false,
|
|
@@ -4064,13 +4065,14 @@ class Mem0Memory {
|
|
|
4064
4065
|
const count = Math.max(items.length, 1);
|
|
4065
4066
|
for (let i = 0; i < count; i++) {
|
|
4066
4067
|
const memoryKey = this.getNodeParameter('memoryKey', i);
|
|
4067
|
-
const
|
|
4068
|
+
const requestedRetrievalMode = this.getNodeParameter('retrievalMode', i);
|
|
4068
4069
|
const threadId = this.getNodeParameter('threadId', i);
|
|
4069
4070
|
const project = this.getNodeParameter('project', i, '');
|
|
4070
4071
|
const adv = applyOperationalPreset(readAdvancedOptions(this, i));
|
|
4072
|
+
const retrievalMode = adv.useVectorMemory === false ? 'basic' : requestedRetrievalMode;
|
|
4071
4073
|
const key = userKeyFrom(threadId, adv, project);
|
|
4072
4074
|
const query = asSearchQuery(this.getNodeParameter('query', i, ''));
|
|
4073
|
-
const connectedEmbedding = await getConnectedEmbedding(this, i);
|
|
4075
|
+
const connectedEmbedding = adv.useVectorMemory === false ? null : await getConnectedEmbedding(this, i);
|
|
4074
4076
|
let payload;
|
|
4075
4077
|
if (retrievalMode === 'semantic' || retrievalMode === 'semanticV2') {
|
|
4076
4078
|
const body = { query: String(query || '') };
|
package/package.json
CHANGED