From b0c3b1721a904d0a958fd0b83fc3f74a155cb340 Mon Sep 17 00:00:00 2001
From: Miao Zhuang <1060950782@163.com>
Date: Wed, 6 Dec 2023 11:09:04 +0800
Subject: [PATCH] fix: prompt & bug (#698)
---
app/pages/Import/AIImport/Create.tsx | 2 +-
.../Import/TaskList/TaskItem/AIImportItem.tsx | 18 ++++----
app/pages/Import/TaskList/index.tsx | 2 +-
app/pages/Import/index.tsx | 21 +++------
app/pages/MainPage/index.tsx | 2 +-
app/pages/Schema/SchemaConfig/index.tsx | 2 +-
app/stores/llm.ts | 19 +++++---
server/api/studio/etc/studio-api.yaml | 4 +-
server/api/studio/internal/model/llm-job.go | 29 +-----------
.../api/studio/internal/service/llm/import.go | 9 ++--
server/api/studio/pkg/base/types.go | 26 +++++++++++
server/api/studio/pkg/llm/importjob.go | 44 ++++++++++++-------
server/api/studio/pkg/llm/job.go | 9 ++--
.../api/studio/pkg/llm/transformer/openai.go | 2 +-
14 files changed, 101 insertions(+), 88 deletions(-)
diff --git a/app/pages/Import/AIImport/Create.tsx b/app/pages/Import/AIImport/Create.tsx
index 8e8aab00..4a43e0dd 100644
--- a/app/pages/Import/AIImport/Create.tsx
+++ b/app/pages/Import/AIImport/Create.tsx
@@ -157,7 +157,7 @@ const Create = observer((props: { visible: boolean; onCancel: () => void }) => {
- {type === 'file' ? valuse.file : valuse.filePath}
+ {valuse.file}
diff --git a/app/pages/Import/TaskList/TaskItem/AIImportItem.tsx b/app/pages/Import/TaskList/TaskItem/AIImportItem.tsx
index 936b2a1a..de6d2626 100644
--- a/app/pages/Import/TaskList/TaskItem/AIImportItem.tsx
+++ b/app/pages/Import/TaskList/TaskItem/AIImportItem.tsx
@@ -60,7 +60,7 @@ const AIImportItem = observer((props: IProps) => {
const onTaskDelete = () => {
_delete('/api/llm/import/job/' + llmJob.job_id)().then((res) => {
if (res.code === 0) {
- antMsg.success(intl.get('import.deleteSuccess'));
+ antMsg.success(intl.get('common.success'));
props.onRefresh();
}
});
@@ -69,7 +69,7 @@ const AIImportItem = observer((props: IProps) => {
const onTaskStop = () => {
post('/api/llm/import/job/cancel')({ jobId: llmJob.job_id }).then((res) => {
if (res.code === 0) {
- antMsg.success(intl.get('import.stopImportingSuccess'));
+ antMsg.success(intl.get('common.success'));
props.onRefresh();
}
});
@@ -78,7 +78,7 @@ const AIImportItem = observer((props: IProps) => {
setRerunLoading(true);
const res = await post('/api/llm/import/job/rerun')({ jobId: llmJob.job_id });
if (res.code === 0) {
- antMsg.success(intl.get('common.rerunSuccess'));
+ antMsg.success(intl.get('common.success'));
props.onRefresh();
}
setRerunLoading(false);
@@ -172,11 +172,13 @@ const AIImportItem = observer((props: IProps) => {
/>
-
+ {llmJob.status !== ILLMStatus.Pending && (
+
+ )}
{llmJob.status === ILLMStatus.Running && (
{
{intl.get('import.uploadTemp')}
)}
- {global.appSetting.beta.open && global.appSetting.beta.functions.llmImport.open && (
+ {global.appSetting.beta.open && global.appSetting.beta.functions?.llmImport.open && (