From dd2c4b6b3ca8a3992b11535d1a12f2fe875fb4e7 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 11 May 2024 19:46:33 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91AI=EF=BC=9A?= =?UTF-8?q?API=20=E6=A8=A1=E5=9E=8B=E7=AE=A1=E7=90=86=EF=BC=88=E5=AE=8C?= =?UTF-8?q?=E5=96=84=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ai/model/apiKey/index.ts | 5 +++ src/views/ai/model/apiKey/ApiKeyForm.vue | 18 ++++---- src/views/ai/model/apiKey/index.vue | 9 ++-- .../ai/model/chatModel/ChatModelForm.vue | 41 +++++++++++++++---- src/views/ai/model/chatModel/index.vue | 37 ++++++++++------- 5 files changed, 73 insertions(+), 37 deletions(-) diff --git a/src/api/ai/model/apiKey/index.ts b/src/api/ai/model/apiKey/index.ts index c96f2a66..60d8a46c 100644 --- a/src/api/ai/model/apiKey/index.ts +++ b/src/api/ai/model/apiKey/index.ts @@ -17,6 +17,11 @@ export const ApiKeyApi = { return await request.get({ url: `/ai/api-key/page`, params }) }, + // 获得 API 密钥列表 + getApiKeyList: async () => { + return await request.get({ url: `/ai/api-key/simple-list` }) + }, + // 查询 API 密钥详情 getApiKey: async (id: number) => { return await request.get({ url: `/ai/api-key/get?id=` + id }) diff --git a/src/views/ai/model/apiKey/ApiKeyForm.vue b/src/views/ai/model/apiKey/ApiKeyForm.vue index 2f9ba580..a8fc0128 100644 --- a/src/views/ai/model/apiKey/ApiKeyForm.vue +++ b/src/views/ai/model/apiKey/ApiKeyForm.vue @@ -7,13 +7,7 @@ label-width="120px" v-loading="formLoading" > - - - - - - - + - - + + + + + + + + diff --git a/src/views/ai/model/apiKey/index.vue b/src/views/ai/model/apiKey/index.vue index fcafc463..6daf6a7d 100644 --- a/src/views/ai/model/apiKey/index.vue +++ b/src/views/ai/model/apiKey/index.vue @@ -60,15 +60,14 @@ - - - - + - + + +