mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-15 07:05:21 +08:00
将ai接口移至quickcommand,支持在配置菜单全局配置ai接口
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user