Set the search summary model from the settings panel
Summarizing web search results falls back to DEFAULT_MODEL, so a local Ollama model ends up doing it and the call can fail — which surfaces only as "保存できる要約なし" in the chat. Make SEARCH_SUMMARY_MODEL settable at runtime: add it to the settings allowlist and read it from os.environ on each call (knowledge._summary_model), the way LOCAL_KB_EMBEDDING_MODEL already works. Importing it as a config constant would keep the old value until a restart. Show the current value of the settings that are not secrets. A model name rendered as ••••qwen3 gives no way to tell what is in effect, so the store now marks those keys (NON_SECRET_KEYS) and returns them unmasked; the API field is renamed masked -> display_value and carries a secret flag that the panel uses to pick the input type, replacing the list it kept on its own side. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,7 @@ TAVILY_API_KEY: str | None = os.getenv("TAVILY_API_KEY")
|
||||
# 蓄積した知識をシステムプロンプトに注入する際の最大件数
|
||||
KNOWLEDGE_CONTEXT_LIMIT: int = int(os.getenv("KNOWLEDGE_CONTEXT_LIMIT", "15"))
|
||||
# Web検索結果を構造的な要約にまとめる際に使うモデル(未設定ならDEFAULT_MODELを使用)
|
||||
# GUI設定画面から実行時に変更できるため、実際の参照は memory_kb/knowledge._summary_model() が os.environ から行う。
|
||||
SEARCH_SUMMARY_MODEL: str | None = os.getenv("SEARCH_SUMMARY_MODEL")
|
||||
|
||||
# ローカルMarkdownナレッジベース(話題に応じて関連ファイルをシステムプロンプトに注入)
|
||||
|
||||
Reference in New Issue
Block a user