mirror of
https://gitcode.com/JianFeeeee/ModelRouter.git
synced 2026-11-10 11:17:22 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5d045f97a8 | |||
| e48baa1bb3 |
4
cmd/gui/package-lock.json
generated
4
cmd/gui/package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "modelrouter-gui",
|
"name": "modelrouter-gui",
|
||||||
"version": "1.0.0",
|
"version": "1.1.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "modelrouter-gui",
|
"name": "modelrouter-gui",
|
||||||
"version": "1.0.0",
|
"version": "1.1.1",
|
||||||
"license": "Proprietary",
|
"license": "Proprietary",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"electron": "^33.0.0",
|
"electron": "^33.0.0",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "modelrouter-gui",
|
"name": "modelrouter-gui",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "ModelRouter Desktop — embedded ModelRouter core with tray",
|
"description": "ModelRouter Desktop — embedded ModelRouter core with tray",
|
||||||
"author": "ModelRouter",
|
"author": "ModelRouter",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
|
|||||||
@ -2268,6 +2268,7 @@
|
|||||||
firstChunk = Date.now();
|
firstChunk = Date.now();
|
||||||
try {
|
try {
|
||||||
const resp = await fetch("/api/chat", {
|
const resp = await fetch("/api/chat", {
|
||||||
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
model,
|
model,
|
||||||
@ -2516,6 +2517,8 @@
|
|||||||
btn.disabled = true;
|
btn.disabled = true;
|
||||||
try {
|
try {
|
||||||
await api("/api/sources", {
|
await api("/api/sources", {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify(payload),
|
body: JSON.stringify(payload),
|
||||||
});
|
});
|
||||||
toast(t("toastSaved"));
|
toast(t("toastSaved"));
|
||||||
@ -3114,6 +3117,8 @@
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
await api("/api/auto", {
|
await api("/api/auto", {
|
||||||
|
method: "PUT",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify({ rules }),
|
body: JSON.stringify({ rules }),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -3372,6 +3377,8 @@
|
|||||||
if (!name || !code) return toast(t("toastNeedAll"));
|
if (!name || !code) return toast(t("toastNeedAll"));
|
||||||
try {
|
try {
|
||||||
await api("/api/adapters", {
|
await api("/api/adapters", {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify({ name, code }),
|
body: JSON.stringify({ name, code }),
|
||||||
});
|
});
|
||||||
toast(t("toastUploaded"));
|
toast(t("toastUploaded"));
|
||||||
@ -3584,6 +3591,8 @@
|
|||||||
}
|
}
|
||||||
async function putScope(key, scopes) {
|
async function putScope(key, scopes) {
|
||||||
await api("/api/keys/" + encodeURIComponent(key), {
|
await api("/api/keys/" + encodeURIComponent(key), {
|
||||||
|
method: "PUT",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify({ models: scopes }),
|
body: JSON.stringify({ models: scopes }),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -3905,6 +3914,8 @@
|
|||||||
let j;
|
let j;
|
||||||
try {
|
try {
|
||||||
j = await api("/api/keys", {
|
j = await api("/api/keys", {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
name,
|
name,
|
||||||
role: $("#kc-role").value,
|
role: $("#kc-role").value,
|
||||||
|
|||||||
Reference in New Issue
Block a user