Skip to content

Commit 610ac8c

Browse files
Wang-Daojiyuan.wangfridayL
authored
Feat/fix palyground bug (#693)
* fix playground bug, internet search judge * fix playground internet bug * modify delete mem * modify tool resp bug in multi cube * fix bug in playground chat handle and search inter * modify prompt * fix bug in playground * fix bug playfround * fix bug * fix code * fix model bug in playground * modify plan b * llm param modify * add logger in playground * modify code * fix bug * modify code * modify code * fix bug * fix search bug in plarground * fixx bug * move schadualr to back * modify pref location * modify fast net search * add tags and new package * modify prompt fix bug * remove nltk due to image promblem * prompt modify * modify bug remove redundant field * modify bug * fix playground bug * fix bug * bust internet topk * bust to 50 * fix bug cite --------- Co-authored-by: yuan.wang <[email protected]> Co-authored-by: chunyu li <[email protected]>
1 parent ef67c6f commit 610ac8c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/memos/api/handlers/chat_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,12 +505,12 @@ def generate_chat_response() -> Generator[str, None, None]:
505505

506506
# Filter memories by threshold, min_num is the min number of memories for playground
507507
second_filtered_memories = self._filter_memories_by_threshold(
508-
memories_list, min_num=15
508+
memories_list, min_num=30
509509
)
510510

511511
# dedup and supplement memories
512512
fast_length = len(filtered_memories)
513-
supplement_length = max(0, 25 - fast_length) # 25 is the max mem for playground
513+
supplement_length = max(0, 50 - fast_length) # 50 is the max mem for playground
514514
filtered_memories = self._dedup_and_supplement_memories(
515515
filtered_memories, second_filtered_memories
516516
)[:supplement_length]

src/memos/templates/mos_prompts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
- When using facts from memories, add citations at the END of the sentence with `[i:memId]`.
116116
- `i` is the order in the "Memories" section below (starting at 1). `memId` is the given short memory ID.
117117
- Multiple citations must be concatenated directly, e.g., `[1:sed23s], [
118-
2:1k3sdg], [3:ghi789]`. Do NOT use commas inside brackets. Do not use wrong format like `[def456]`.
118+
2:1k3sdg], [3:ghi789]`. Do NOT use commas inside brackets. Do not use wrong format like `[def456]`, `[1]` etc.
119119
- Cite only relevant memories; keep citations minimal but sufficient.
120120
- Do not use a connected format like [1:abc123,2:def456].
121121
- Brackets MUST be English half-width square brackets `[]`, NEVER use Chinese full-width brackets `【】` or any other symbols.
@@ -222,7 +222,7 @@
222222
- 使用记忆中的事实时,在句尾添加引用格式`[i:memId]`。
223223
- `i`是下面"记忆"部分中的顺序(从1开始)。`memId`是给定的短记忆ID。
224224
- 多个引用必须直接连接,例如,`[1:sed23s], [
225-
2:1k3sdg], [3:ghi789]`。不要在方括号内使用逗号。不要使用错误格式如`[def456]`。
225+
2:1k3sdg], [3:ghi789]`。不要在方括号内使用逗号。不要使用错误格式如`[def456]`, `[1]`等
226226
- 只引用相关记忆;保持引用最少但充分。
227227
- 不要使用连接格式如[1:abc123,2:def456]。
228228
- 方括号必须是英文半角方括号`[]`,绝不使用中文全角括号`【】`或任何其他符号。

0 commit comments

Comments
 (0)