diff --git a/app/Services/AiChatService.php b/app/Services/AiChatService.php index d457732..87e3984 100644 --- a/app/Services/AiChatService.php +++ b/app/Services/AiChatService.php @@ -26,8 +26,10 @@ class AiChatService { /** * 每个用户保留的最大对话轮数 + * + * 设置较小值可减少 token 输入量,加快本地 Ollama CPU 推理速度。 */ - private const MAX_CONTEXT_ROUNDS = 10; + private const MAX_CONTEXT_ROUNDS = 4; /** * AI 请求超时时间(秒)