Python
Merge pull request #261 from Tencent-Hunyuan/feat/sdk-multilingual-prompts
feitianxiang75ac1b01f2ff
diff --cc CHANGELOG.mdindex b59854a,48f0d1e..274d417--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -4,10 -4,37 +4,39 @@@ Hy Memory and MemHub are versioned and## Unreleased+ - Hy Memory: LLM prompts now ship in 11 languages: `en`, `zh-Hans`,+ `zh-Hant`, `ja`, `es`, `de`, `pt`, `fr`, `ko`, `ru` and `id`. They live in+ one registry, `hy_memory/prompts/`, with one module per language. Call+ sites use `get_prompt(name, language)`, so a new language only needs a new+ module. The registry covers chat extraction (system prompt, basic_info,+ intentions, few-shot including Example 11), the no-intention variant,+ reconcile and its search-query prompt, the working/coding extractor, both+ coding reconcilers and the chain summary, the episode and topic summaries,+ System 2 evolve, and the user name line. The English and Simplified Chinese+ strings are unchanged byte for byte, and a test pins them. The old names+ (`prompts_zh.*_ZH`, `extractor.EXTRACT_SYSTEM_PROMPT`, ...) still import.+ The nine new languages are machine translations, and native-speaker review+ is recommended.+ - Hy Memory: new optional `language` to choose the prompt language+ explicitly. Set it on `MemoryConfig.language` (env `MEMORY_LANGUAGE`) for+ a client default, or per call on `add` / `async_add`, `add_extracted`,+ `finalize_session`, `evolve` and `sweep`. A per-call value overrides the+ config. The value goes through every LLM call of the request: extract and+ basic profile, reconcile, the coding path, the summaries and System 2.+ Aliases: `zh`, `zh-CN` → `zh-Hans`; `zh-TW`, `zh-HK` → `zh-Hant`; `pt-BR` →+ `pt`. An unknown code raises `ValueError` listing the supported codes, and+ the HTTP server returns 400. With an explicit language, memories are+ written in that language even when the conversation uses another one.+ Without a language, the existing zh/en auto-detection runs unchanged and+ memories keep the source language. `search` has no `language`: its judge+ and rewrite prompts are English-only and keep the query's language.+ - Hy Memory: the HTTP server accepts `language` on `/api/v1/add` and+ `/api/v1/add_extracted`.+## Hy Memory 2.0.10 — 2026-11-01+- Published+ [`hy-memory==2.0.10`](https://pypi.org/project/hy-memory/2.0.10/).- New `hy_memory.reembed` module for switching the embeddingmodel. Writers must be paused for the whole run. Nothing is derived fromthe provider or endpoint: source and target are named explicitly, and the