mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
refactor: refactor from ChatflowHistoryService and ChatflowMemoryService
This commit is contained in:
@ -761,9 +761,9 @@ def _fetch_memory_blocks(workflow: Workflow, conversation_id: str, is_draft: boo
|
||||
is_draft=is_draft,
|
||||
)
|
||||
for memory in memories:
|
||||
if memory.scope == MemoryScope.APP:
|
||||
memory_blocks[memory.memory_id] = memory.value
|
||||
if memory.spec.scope == MemoryScope.APP:
|
||||
memory_blocks[memory.spec.id] = memory.value
|
||||
else: # NODE scope
|
||||
memory_blocks[f"{memory.node_id}.{memory.memory_id}"] = memory.value
|
||||
memory_blocks[f"{memory.node_id}.{memory.spec.id}"] = memory.value
|
||||
|
||||
return memory_blocks
|
||||
|
||||
Reference in New Issue
Block a user