mirror of
https://github.com/FuQuan233/nonebot-plugin-llmchat.git
synced 2026-06-28 00:02:04 +00:00
🐛 修复配置字段名称拼写错误,更新为additional_prompt并添加调试日志
This commit is contained in:
parent
975cc4705d
commit
a857dbf6c2
2 changed files with 6 additions and 4 deletions
|
|
@ -395,12 +395,14 @@ async def process_messages(context_id: int, is_group: bool = True):
|
|||
|
||||
systemPrompt = "\n".join(system_lines)
|
||||
if preset.support_mcp:
|
||||
systemPrompt += "你也可以使用一些工具,下面是关于这些工具的额外说明:\n"
|
||||
systemPrompt += "\n你也可以使用一些工具,下面是关于这些工具的额外说明:\n"
|
||||
for mcp_name, mcp_config in plugin_config.mcp_servers.items():
|
||||
if mcp_config.addtional_prompt:
|
||||
systemPrompt += f"{mcp_name}:{mcp_config.addtional_prompt}"
|
||||
if mcp_config.additional_prompt:
|
||||
systemPrompt += f"{mcp_name}:{mcp_config.additional_prompt}"
|
||||
systemPrompt += "\n"
|
||||
|
||||
logger.debug(f"构建系统提示词:\n{systemPrompt}")
|
||||
|
||||
messages: list[ChatCompletionMessageParam] = [
|
||||
{"role": "system", "content": systemPrompt}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue