feat: 添加了中英文动作插件模板,更新了摘要和智能思维导图插件,并简化了异步上下文压缩插件的模型阈值配置。

This commit is contained in:
fujie
2025-12-20 14:59:55 +08:00
parent 0c380b9fe4
commit 0ef4d67d09
9 changed files with 703 additions and 448 deletions

View File

@@ -362,8 +362,8 @@ class Action:
description="Whether to show action status updates in the chat interface.",
)
LLM_MODEL_ID: str = Field(
default="gemini-2.5-flash",
description="Built-in LLM model ID for text analysis.",
default="",
description="Built-in LLM model ID for text analysis. If empty, uses the current conversation's model.",
)
MIN_TEXT_LENGTH: int = Field(
default=100,
@@ -514,8 +514,13 @@ class Action:
long_text_content=long_text_content,
)
# Determine model to use
target_model = self.valves.LLM_MODEL_ID
if not target_model:
target_model = body.get("model")
llm_payload = {
"model": self.valves.LLM_MODEL_ID,
"model": target_model,
"messages": [
{"role": "system", "content": SYSTEM_PROMPT_MINDMAP_ASSISTANT},
{"role": "user", "content": formatted_user_prompt},

View File

@@ -363,8 +363,8 @@ class Action:
default=True, description="是否在聊天界面显示操作状态更新。"
)
LLM_MODEL_ID: str = Field(
default="gemini-2.5-flash",
description="用于文本分析的内置LLM模型ID。",
default="",
description="用于文本分析的内置LLM模型ID。如果为空,则使用当前对话的模型。",
)
MIN_TEXT_LENGTH: int = Field(
default=100, description="进行思维导图分析所需的最小文本长度(字符数)。"
@@ -514,13 +514,17 @@ class Action:
long_text_content=long_text_content,
)
# 确定使用的模型
target_model = self.valves.LLM_MODEL_ID
if not target_model:
target_model = body.get("model")
llm_payload = {
"model": self.valves.LLM_MODEL_ID,
"model": target_model,
"messages": [
{"role": "system", "content": SYSTEM_PROMPT_MINDMAP_ASSISTANT},
{"role": "user", "content": formatted_user_prompt},
],
"temperature": 0.5,
"stream": False,
}
user_obj = Users.get_user_by_id(user_id)