将ai接口移至quickcommand,支持在配置菜单全局配置ai接口

This commit is contained in:
fofolee
2025-02-18 00:59:28 +08:00
parent 3eca3b448e
commit 9e00a08253
13 changed files with 393 additions and 257 deletions

View File

@@ -5,6 +5,9 @@ const kill = require("tree-kill");
const iconv = require("iconv-lite");
const path = require("path");
const axios = require("axios");
const { chat, getModels } = require("./ai");
window.getModelsFromAiApi = getModels;
const systemDialog = require("./dialog/service");
@@ -184,6 +187,11 @@ const quickcommand = {
}
return null;
},
askAI: async function (content, apiConfig) {
return await chat(content, apiConfig);
},
...systemDialog,
};