fix: use memory_type_label instead of undefined memory_type (NameError)#2
Open
Exploreunive wants to merge 5 commits intomainfrom
Open
fix: use memory_type_label instead of undefined memory_type (NameError)#2Exploreunive wants to merge 5 commits intomainfrom
Exploreunive wants to merge 5 commits intomainfrom
Conversation
…ing the first one Previously, the search API silently ignored all memory_types except the first one. Now all specified memory_types are searched and results are merged. This fixes the issue where passing memory_types=episodic_memory,foresight would only search episodic_memory and silently ignore foresight. Fixes EverMind-AI#78
…sponse and retrieve_mem_agentic The local variable 'memory_type_label' is defined but was incorrectly referenced as 'memory_type' in 8 places across two methods: - _to_response: lines 817, 820 (Metadata construction) - retrieve_mem_agentic: lines 910, 920, 944, 991, 997, 1009 (record_retrieve_request calls and _rerank positional args) Using undefined 'memory_type' would cause NameError at runtime when these code paths are executed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
src/agentic_layer/memory_manager.py中memory_type_label已定义但错误引用为memory_type(未定义),共 8 处,运行时会抛NameError。受影响方法
_to_responsememory_type而非memory_type_labelretrieve_mem_agenticrecord_retrieve_request()调用retrieve_mem_agentic_rerank()位置参数Root Cause
memory_type_label由req.memory_types拼接而成(如"episodic,semantic"),但代码引用了不存在的memory_type变量。Fix
将 8 处
memory_type替换为memory_type_label。