fix: manage_scheduled_task + search_web 注入 + 删除 LM Studio

- manage_scheduled_task: INSERT 加 user_id='', 检查 psql 退出码
- search_web: 用 python json.dumps 构造请求体(防止注入)
- 删除 lmstudio.rs / LmStudioConfig,仅保留 DeepSeek
- config.json 移除 lmstudio 段
This commit is contained in:
2026-06-02 13:51:46 +08:00
parent 7ab5052642
commit a549bd3b2f
8 changed files with 29 additions and 226 deletions
+1 -6
View File
@@ -230,12 +230,7 @@ async fn cmd_listen(
let conversation = if enable_llm {
let sys_prompt = std::env::var("WEIXIN_LLM_SYSTEM_PROMPT")
.unwrap_or_else(|_| DEFAULT_SYSTEM_PROMPT.to_string());
let provider = std::env::var("LLM_PROVIDER").unwrap_or_else(|_| "deepseek".to_string());
let model = if provider == "lmstudio" {
config.llm.lmstudio.model.clone()
} else {
config.llm.deepseek.model.clone()
};
let model = config.llm.deepseek.model.clone();
let mut cfg = ConversationConfig {
system_prompt: sys_prompt,