V 2.2.6 增加了MJ的api

This commit is contained in:
2024-06-01 15:08:22 +08:00
parent 941a86d07a
commit 8b011856c2
52 changed files with 3255 additions and 2376 deletions
+5 -8
View File
@@ -2,6 +2,7 @@ let fspromises = require('fs').promises;
import { cloneDeep, get } from "lodash";
import { define } from "./define";
const { v4: uuidv4 } = require('uuid');
import { apiUrl } from "./api/apiUrlDefine";
// Create a shared object
export const gptDefine = {
@@ -271,13 +272,7 @@ export const gptDefine = {
}
},
gpt_options: [{
label: "openai-hk",
value: "https://api.openai-hk.com/v1/chat/completions"
}, {
label: "通义千问",
value: "https://dashscope.aliyuncs.com/api/v1/services/aigc/text-generation/generation"
}],
gpt_options: apiUrl,
gpt_model_options: [{
label: "gpt-3.5-turbo-16k",
@@ -377,7 +372,9 @@ export const gptDefine = {
gpt[index] = value;
}
} else {
value.id = uuidv4();
let tmp_id = uuidv4();
value.id = tmp_id;
value.value = tmp_id;
gpt.push(value);
}
tmp_gpt[property] = gpt;