AI新增润色和扩写的预设角色

This commit is contained in:
fofolee
2025-02-21 16:23:02 +08:00
parent 7635f1ac64
commit 3c0c7b7117
4 changed files with 36 additions and 7 deletions

View File

@@ -56,6 +56,8 @@ export default defineComponent({
{ label: "无", value: "" },
{ label: "翻译", value: "translate" },
{ label: "总结", value: "summarize" },
{ label: "润色", value: "polish" },
{ label: "扩写", value: "expand" },
{ label: "生成shell命令", value: "shell" },
],
apiTypeOptions: [

View File

@@ -877,7 +877,7 @@ interface quickcommandApi {
* 与 AI 进行问答
* @param content 对话内容
* @param content.prompt 提示词
* @param content.role 预设角色
* @param content.role 预设角色: translate|shell|summarize|polish|expand
* @param apiConfig API配置不传或传入null则使用用户配置的第一个API配置
* @param apiConfig.apiType 模型类型openai/ollama
* @param apiConfig.apiUrl API地址
@@ -939,8 +939,8 @@ interface quickcommandApi {
content: {
/** 提示词 */
prompt: string;
/** 预设角色 */
role?: "translate" | "shell" | "summarize";
/** 预设角色: 翻译、shell命令生成、总结、润色、扩写 */
role?: "translate" | "shell" | "summarize" | "polish" | "expand";
},
/** API配置不传或传入null则使用用户配置的第一个API配置 */
apiConfig?: {