remove:无用配置,整理配置文件
This commit is contained in:
@@ -47,7 +47,7 @@ def get_action_tool_specs() -> List[ToolSpec]:
|
||||
get_reply_tool_spec(),
|
||||
get_view_complex_message_tool_spec(),
|
||||
get_query_jargon_tool_spec(),
|
||||
get_query_memory_tool_spec(enabled=bool(global_config.maisaka.enable_memory_query_tool)),
|
||||
get_query_memory_tool_spec(enabled=bool(global_config.memory.enable_memory_query_tool)),
|
||||
get_send_emoji_tool_spec(),
|
||||
]
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ async def handle_tool(
|
||||
f"不支持的检索模式:{mode}。可选值:search/time/hybrid/episode/aggregate。",
|
||||
)
|
||||
|
||||
default_limit = max(1, int(getattr(global_config.maisaka, "memory_query_default_limit", 5) or 5))
|
||||
default_limit = max(1, global_config.memory.memory_query_default_limit)
|
||||
try:
|
||||
limit = int(invocation.arguments.get("limit", default_limit) or default_limit)
|
||||
except (TypeError, ValueError):
|
||||
|
||||
@@ -596,7 +596,7 @@ class MaisakaReasoningEngine:
|
||||
planner_prefix: str,
|
||||
) -> MessageSequence:
|
||||
message_sequence = build_prefixed_message_sequence(message.raw_message, planner_prefix)
|
||||
if global_config.chat.multimodal_planner:
|
||||
if global_config.visual.multimodal_planner:
|
||||
await self._hydrate_visual_components(message_sequence.components)
|
||||
return message_sequence
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ from .tool_provider import MaisakaBuiltinToolProvider
|
||||
|
||||
logger = get_logger("maisaka_runtime")
|
||||
|
||||
MAX_INTERNAL_ROUNDS = 6
|
||||
|
||||
|
||||
class MaisakaHeartFlowChatting:
|
||||
"""会话级别的 Maisaka 运行时。"""
|
||||
@@ -78,7 +80,7 @@ class MaisakaHeartFlowChatting:
|
||||
self._message_debounce_required = False
|
||||
self._last_message_received_at = 0.0
|
||||
self._wait_timeout_task: Optional[asyncio.Task[None]] = None
|
||||
self._max_internal_rounds = global_config.maisaka.max_internal_rounds
|
||||
self._max_internal_rounds = MAX_INTERNAL_ROUNDS
|
||||
self._max_context_size = max(1, int(global_config.chat.max_context_size))
|
||||
self._agent_state: Literal["running", "wait", "stop"] = self._STATE_STOP
|
||||
self._wait_until: Optional[float] = None
|
||||
|
||||
Reference in New Issue
Block a user