remove:移除内部固定温度参数

This commit is contained in:
SengokuCola
2026-04-21 13:43:13 +08:00
parent 54d3f156d4
commit 269c434778
7 changed files with 5 additions and 74 deletions

View File

@@ -24,7 +24,6 @@ async def _run_expression_selector(tool_ctx: BuiltinToolRuntimeContext, system_p
system_prompt=system_prompt,
request_kind="expression_selector",
max_tokens=256,
temperature=0.1,
)
return (response.content or "").strip()

View File

@@ -187,7 +187,6 @@ class MaisakaChatLoopService:
chat_system_prompt: Optional[str] = None,
session_id: Optional[str] = None,
is_group_chat: Optional[bool] = None,
temperature: float = 0.5,
max_tokens: int = 2048,
) -> None:
"""初始化 Maisaka 对话循环服务。
@@ -196,11 +195,9 @@ class MaisakaChatLoopService:
chat_system_prompt: 可选的系统提示词。
session_id: 当前会话 ID用于匹配会话级额外提示。
is_group_chat: 当前会话是否为群聊。
temperature: 规划器温度参数。
max_tokens: 规划器最大输出长度。
"""
self._temperature = temperature
self._max_tokens = max_tokens
self._is_group_chat = is_group_chat
self._session_id = session_id or ""
@@ -546,7 +543,6 @@ class MaisakaChatLoopService:
message_factory=message_factory,
options=LLMGenerationOptions(
tool_options=all_tools if all_tools else None,
temperature=self._temperature,
max_tokens=self._max_tokens,
response_format=response_format,
interrupt_flag=self._interrupt_flag,

View File

@@ -138,7 +138,6 @@ class MaisakaReasoningEngine:
request_kind="timing_gate",
interrupt_flag=None,
max_tokens=TIMING_GATE_MAX_TOKENS,
temperature=0.1,
tool_definitions=tool_definitions,
)

View File

@@ -566,7 +566,6 @@ class MaisakaHeartFlowChatting:
interrupt_flag: asyncio.Event | None = None,
max_tokens: int = 512,
response_format: RespFormat | None = None,
temperature: float = 0.2,
tool_definitions: Optional[Sequence[ToolDefinitionInput]] = None,
) -> ChatResponse:
"""运行一个复制上下文的临时子代理,并在完成后立即销毁。"""
@@ -584,7 +583,6 @@ class MaisakaHeartFlowChatting:
chat_system_prompt=system_prompt,
session_id=self.session_id,
is_group_chat=self.chat_stream.is_group_session,
temperature=temperature,
max_tokens=max_tokens,
)
sub_agent.set_interrupt_flag(interrupt_flag)
@@ -611,7 +609,6 @@ class MaisakaHeartFlowChatting:
request_kind="reply_effect_judge",
extra_messages=[judge_message],
max_tokens=900,
temperature=0.1,
tool_definitions=[],
)
return (response.content or "").strip()