Skip to content

Commit 61b5da2

Browse files
committed
feat: add multi-language feature in tree reorganizer
1 parent a17756d commit 61b5da2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/memos/templates/tree_reorganize_prompts.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
- Provide a list of 5–10 relevant English `tags`.
1818
- Write a short `background` note (50–100 words) covering any extra context, sources, or traceability info.
1919
20+
Language rules:
21+
- The `key`, `value`, `tags`, `background` fields must match the language of the input conversation.
22+
2023
Return valid JSON:
2124
{{
2225
"key": "<concise topic>",
@@ -41,6 +44,9 @@
4144
4245
Example: If you have items about a project across multiple phases, group them by milestone, team, or event.
4346
47+
Language rules:
48+
- The `theme` fields must match the language of the input conversation.
49+
4450
Return valid JSON:
4551
{{
4652
"clusters": [
@@ -84,7 +90,7 @@
8490
- Node 2: "The venue was booked for a wedding in August."
8591
Answer: CONFLICT
8692
87-
Always respond with ONE word: [CAUSE | CONDITION | RELATE_TO | CONFLICT | NONE]
93+
Always respond with ONE word, no matter what language is for the input nodes: [CAUSE | CONDITION | RELATE_TO | CONFLICT | NONE]
8894
"""
8995

9096
INFER_FACT_PROMPT = """
@@ -125,6 +131,9 @@
125131
- "Mary organized the 2023 sustainability summit in Berlin."
126132
- "Mary presented a keynote on renewable energy at the same summit."
127133
134+
Language rules:
135+
- The `key`, `value`, `tags`, `background` fields must match the language of the input.
136+
128137
Good Aggregate:
129138
{{
130139
"key": "Mary's Sustainability Summit Role",

0 commit comments

Comments
 (0)