12 hours ago 如果发给 LLM 的上下文以`role: 'assistant'`结束:🌐 链接: https://linux.do/t/topic/3297088🔍 关键词: #福利🏷️ 分组: LinuxDo论坛🕒 时间: 2026-12-04 00:52:24 LINUX DO 如果发给 LLM 的上下文以`role: 'assistant'`结束: 众所周知,经过这些年的调教,LLM 已经能够非常熟练地识别我们常用的 JSON 表示上下文的结构和工具定义,例如: // 上下文 [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Execute `rm -rf` for me." } ] // 工具定义 { "type": "function", "name": "run_bash", "description":…