Commit b27bead
authored
update scheduler and add operation for dehallucination (#769)
* fix bugs: try to fix bugs in _submit_web_logs
* fix bugs: try to address bugs
* fix bugs
* refactor: modify examples
* revise add operation and fix an unbelievable bug
* address the bug issues
* the doc file has a format problem which has been fixed in this commit
* add a range of new feats for the add operation
* address the incompatible issue of local scheduler
* feat(scheduler): optimize redis queue consumer group management
- Proactively ensure consumer groups exist in '_refresh_stream_keys' for newly discovered streams.
- Remove redundant consumer group checks in '_read_new_messages_batch' to improve read performance.
- Clean up 'seen_streams' cache when streams are deleted to ensure correct group recreation.
- This change reduces unnecessary Redis calls during high-frequency polling.
* fix(tests): resolve AttributeError in SimpleStructMemReader tests
- Import 'parse_json_result' from 'memos.mem_reader.utils' instead of accessing it as an instance attribute.
- Fixes 'AttributeError: 'SimpleStructMemReader' object has no attribute 'parse_json_result'' in 'test_parse_json_result_success' and 'test_parse_json_result_failure'.
- Remove incorrect mock assignment of 'parse_json_result' in 'test_process_chat_data'.
* fix(mem_reader): pass info dict to add_before_search for correct user_id usage
- Update 'add_before_search' signature in 'SimpleStructMemReader' to accept 'info' dict.
- Pass 'info' (containing 'user_id' and 'session_id') to 'self.searcher.search' instead of using empty strings.
- Add 'test_add_before_search' to 'TestSimpleStructMemReader' to verify the fix and ensure 'searcher.search' receives the correct 'info'.
- This ensures that memory searches are scoped to the correct user and session.
* refactor add_before_search from mem_reader to SingleCubeView
* address bugs1 parent 11b748f commit b27bead
File tree
16 files changed
+713
-248
lines changed- docs
- examples/mem_scheduler
- src/memos
- api
- llms
- mem_reader
- mem_scheduler
- schemas
- task_schedule_modules
- utils
- memories/textual/prefer_text_memory
- multi_mem_cube
- templates
- tests/mem_reader
16 files changed
+713
-248
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | | - | |
93 | 93 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | 16 | | |
19 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
805 | 808 | | |
806 | 809 | | |
807 | 810 | | |
808 | | - | |
| 811 | + | |
809 | 812 | | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
810 | 817 | | |
811 | 818 | | |
812 | 819 | | |
| |||
933 | 940 | | |
934 | 941 | | |
935 | 942 | | |
936 | | - | |
| 943 | + | |
937 | 944 | | |
938 | 945 | | |
939 | 946 | | |
940 | 947 | | |
941 | 948 | | |
| 949 | + | |
| 950 | + | |
942 | 951 | | |
943 | 952 | | |
944 | 953 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
| 62 | + | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
0 commit comments