Skip to content

Conversation

@kun432
Copy link

@kun432 kun432 commented Oct 20, 2025

  • add Japanese as language.

Notes:

  • Roleplay prompts still need translation, but seems experimental and the current implementation hardcodes zh-only logic, so leaves them as-is.
  • Pytest suite passes, but there seems no tests covering language-switch behavior (zh/ja), not sure what additional checks are required.
  • Running docs/site/flat_docs.py rewrites DOC.md with lots of unrelated updates, so just edited docs/site/references/local_config.mdx for now.

Let me know if there’s anything further I should cover.

@kun432
Copy link
Author

kun432 commented Oct 20, 2025

some results in my end below:

config.yaml

(snip)
language: "ja"
best_llm_model: "gpt-4o-mini"
(snip)
from memobase import MemoBaseClient, ChatBlob

mb_client = MemoBaseClient(
    project_url="http://localhost:8019",
    api_key="secret",
)

uid = mb_client.add_user()
u = mb_client.get_user(uid)

sample_messages = [
    {
        "role": "user",
        "content": "はじめまして。私は太郎といいます。普段はエンジニアをやっています。よろしくお願いします。",
    },
    {
        "role": "assistant",
        "content": "太郎さん、はじめまして。こちらこそよろしくお願いします。ご機嫌いかがですか?"
    },
    {
        "role": "user",
        "content": "明日は、競馬観戦に行く予定なんだよね。楽しみ〜。お天気はどうかな?"
    },
    {
        "role": "assistant",
        "content": "すごく楽しそうですね!明日の阪神競馬場の天気は晴れで、最高の観戦日和になると思いますよ!"
    },
    {
        "role": "user",
        "content": "それはうれしい。実は西宮市に住んでいて、阪神競馬場まで電車で10分くらいなんだ。"
    },
    {
        "role": "assistant",
        "content": "近いですね!混む時間を避けたいなら少し早めに入るのがおすすめです。初観戦ですか?それとも何度か行ったことがありますか?"
    },
    {
        "role": "user",
        "content": "観戦は2回目かな。勝ち負けより雰囲気を楽しみたい派。普段はフルリモートでソフトウェアエンジニアをしてるから、週末に外に出るのがいい気分転換。"
    },
    {
        "role": "assistant",
        "content": "リモートワークなんですね。気分転換にちょうど良さそうです。観戦のお供に、好きな飲み物やフードはありますか?"
    },
    {
        "role": "user",
        "content": "コーヒーが好きで、自家焙煎を始めたところ。浅めの中煎りが好み。そういえば来月、妻と3歳の娘と一緒に札幌の実家へ2日ほど帰省する予定もあるんだ。"
    },
    {
        "role": "assistant",
        "content": "ご家族で札幌へ帰省、楽しみですね!お土産に自家焙煎のコーヒー豆を持っていくのも喜ばれそう。旅行の計画や、焙煎のラベルづくりの相談も手伝えますよ。まずは明日の観戦、日差し対策と水分補給だけお忘れなく!"
    }
]

u.insert(ChatBlob(messages=sample_messages))
u.flush()
print(u.context())
---
# メモリ
ユーザーから関連する質問がない限り、これらのメモリについて会話の中で積極的に言及しないでください。
## ユーザーの現在のプロフィール:
- 基本情報::氏名: 太郎
- 仕事::役職: エンジニア
- 仕事::業界: ソフトウェアエンジニア
- 連絡先::市区町村: 西宮市
- ライフイベント::帰省: 来月、妻と3歳の娘と一緒に札幌の実家へ2日ほど帰省予定[2025/10/20に言及、2025年11月に帰省予定]
- 興味::趣味: 競馬観戦は2回目で、勝ち負けより雰囲気を楽しむ派である[2025/10/20に言及、2025/10/21に競馬観戦]
- 興味::飲み物: コーヒーが好きで、自家焙煎を始めた。浅めの中煎りが好みである。

## 過去のイベント:
- ユーザは太郎という名前である。 // info
- 太郎はエンジニアとして働いている。 // info
- 太郎は明日、競馬観戦に行く予定である。[2025/10/20に言及、2025/10/21に競馬観戦] // schedule
- 太郎は西宮市に住んでいる。 // info
- 太郎は観戦は2回目で、勝ち負けより雰囲気を楽しむ派である。 // info
- 太郎はフルリモートでソフトウェアエンジニアをしている。 // info
- 太郎はコーヒーが好きで、自家焙煎を始めた。浅めの中煎りが好みである。 // info
- 太郎は来月、妻と3歳の娘と一緒に札幌の実家へ2日ほど帰省する予定である。[2025/10/20に言及、2025年11月に帰省予定] // schedule
---

@kun432
Copy link
Author

kun432 commented Oct 21, 2025

I'm not sure whether this is the right approach for adding a new language support

better to use event_theme_requirement? seems it covers extracting not only events, but profiles too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant