fix: model page‘s icon error and change workflow page‘s model api
This commit is contained in:
parent
efbcec98bc
commit
1540fcd0de
@ -5,12 +5,12 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #title>
|
<template #title>
|
||||||
<div class="flex" style="height: 22px">
|
<div class="flex" style="height: 22px">
|
||||||
<span class="ellipsis-1 mb-4" :title="model.name" style="width: 80%">
|
<span class="ellipsis-1 mb-4" :title="model.name" style="max-width: 80%">
|
||||||
{{ model.name }}
|
{{ model.name }}
|
||||||
</span>
|
</span>
|
||||||
<span v-if="currentModel.status === 'ERROR'">
|
<span v-if="currentModel.status === 'ERROR'">
|
||||||
<el-tooltip effect="dark" :content="errMessage" placement="top">
|
<el-tooltip effect="dark" :content="errMessage" placement="top">
|
||||||
<el-icon class="color-danger ml-4" size="18"><Warning /></el-icon>
|
<el-icon class="color-danger ml-4" size="18"><WarningFilled /></el-icon>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="currentModel.status === 'PAUSE_DOWNLOAD'">
|
<span v-if="currentModel.status === 'PAUSE_DOWNLOAD'">
|
||||||
@ -19,7 +19,7 @@
|
|||||||
:content="`${$t('views.model.modelForm.base_model.label')}: ${props.model.model_name} ${$t('views.model.tip.downloadError')}`"
|
:content="`${$t('views.model.modelForm.base_model.label')}: ${props.model.model_name} ${$t('views.model.tip.downloadError')}`"
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
<el-icon class="color-danger ml-4" size="18"><Warning /></el-icon>
|
<el-icon class="color-danger ml-4" size="18"><WarningFilled /></el-icon>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -277,12 +277,14 @@ const validate = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const application = getApplicationDetail()
|
||||||
|
|
||||||
function getSelectModel() {
|
function getSelectModel() {
|
||||||
const obj =
|
const obj =
|
||||||
apiType.value === 'systemManage'
|
apiType.value === 'systemManage'
|
||||||
? {
|
? {
|
||||||
model_type: 'LLM',
|
model_type: 'LLM',
|
||||||
// workspace_id: workspace,
|
workspace_id: application.value?.workspace_id,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
model_type: 'LLM',
|
model_type: 'LLM',
|
||||||
@ -333,8 +335,6 @@ function submitMcpServersDialog(config: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const application = getApplicationDetail()
|
|
||||||
console.log(application.value)
|
|
||||||
getSelectModel()
|
getSelectModel()
|
||||||
if (typeof props.nodeModel.properties.node_data?.is_result === 'undefined') {
|
if (typeof props.nodeModel.properties.node_data?.is_result === 'undefined') {
|
||||||
if (isLastNode(props.nodeModel)) {
|
if (isLastNode(props.nodeModel)) {
|
||||||
|
|||||||
@ -170,7 +170,7 @@
|
|||||||
import { groupBy, set } from 'lodash'
|
import { groupBy, set } from 'lodash'
|
||||||
import NodeContainer from '@/workflow/common/NodeContainer.vue'
|
import NodeContainer from '@/workflow/common/NodeContainer.vue'
|
||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import { ref, computed, onMounted, nextTick } from 'vue'
|
import { ref, computed, onMounted, nextTick, inject } from 'vue'
|
||||||
import { MsgError, MsgSuccess, MsgWarning } from '@/utils/message'
|
import { MsgError, MsgSuccess, MsgWarning } from '@/utils/message'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
import TTSModeParamSettingDialog from '@/views/application/component/TTSModeParamSettingDialog.vue'
|
import TTSModeParamSettingDialog from '@/views/application/component/TTSModeParamSettingDialog.vue'
|
||||||
@ -179,7 +179,7 @@ import UserInputFieldTable from './component/UserInputFieldTable.vue'
|
|||||||
import FileUploadSettingDialog from '@/workflow/nodes/base-node/component/FileUploadSettingDialog.vue'
|
import FileUploadSettingDialog from '@/workflow/nodes/base-node/component/FileUploadSettingDialog.vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
||||||
|
const getApplicationDetail = inject('getApplicationDetail') as any
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -261,12 +261,13 @@ const validate = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const application = getApplicationDetail()
|
||||||
function getSTTModel() {
|
function getSTTModel() {
|
||||||
const obj =
|
const obj =
|
||||||
apiType.value === 'systemManage'
|
apiType.value === 'systemManage'
|
||||||
? {
|
? {
|
||||||
model_type: 'STT',
|
model_type: 'STT',
|
||||||
// workspace_id: workspace,
|
workspace_id: application.value?.workspace_id,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
model_type: 'STT',
|
model_type: 'STT',
|
||||||
@ -283,7 +284,7 @@ function getTTSModel() {
|
|||||||
apiType.value === 'systemManage'
|
apiType.value === 'systemManage'
|
||||||
? {
|
? {
|
||||||
model_type: 'TTS',
|
model_type: 'TTS',
|
||||||
// workspace_id: workspace,
|
workspace_id: application.value?.workspace_id,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
model_type: 'TTS',
|
model_type: 'TTS',
|
||||||
|
|||||||
@ -153,14 +153,14 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import NodeContainer from '@/workflow/common/NodeContainer.vue'
|
import NodeContainer from '@/workflow/common/NodeContainer.vue'
|
||||||
import { computed, nextTick, onMounted, ref } from 'vue'
|
import { computed, nextTick, onMounted, ref, inject } from 'vue'
|
||||||
import { groupBy, set } from 'lodash'
|
import { groupBy, set } from 'lodash'
|
||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import AIModeParamSettingDialog from '@/views/application/component/AIModeParamSettingDialog.vue'
|
import AIModeParamSettingDialog from '@/views/application/component/AIModeParamSettingDialog.vue'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
||||||
|
const getApplicationDetail = inject('getApplicationDetail') as any
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -225,12 +225,13 @@ const form_data = computed({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const application = getApplicationDetail()
|
||||||
function getSelectModel() {
|
function getSelectModel() {
|
||||||
const obj =
|
const obj =
|
||||||
apiType.value === 'systemManage'
|
apiType.value === 'systemManage'
|
||||||
? {
|
? {
|
||||||
model_type: 'TTI',
|
model_type: 'TTI',
|
||||||
// workspace_id: workspace,
|
workspace_id: application.value?.workspace_id,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
model_type: 'TTI',
|
model_type: 'TTI',
|
||||||
|
|||||||
@ -169,7 +169,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import NodeContainer from '@/workflow/common/NodeContainer.vue'
|
import NodeContainer from '@/workflow/common/NodeContainer.vue'
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref, inject } from 'vue'
|
||||||
import { groupBy, set } from 'lodash'
|
import { groupBy, set } from 'lodash'
|
||||||
import NodeCascader from '@/workflow/common/NodeCascader.vue'
|
import NodeCascader from '@/workflow/common/NodeCascader.vue'
|
||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
@ -177,7 +177,7 @@ import AIModeParamSettingDialog from '@/views/application/component/AIModeParamS
|
|||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
||||||
|
const getApplicationDetail = inject('getApplicationDetail') as any
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -245,12 +245,13 @@ const form_data = computed({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const application = getApplicationDetail()
|
||||||
function getSelectModel() {
|
function getSelectModel() {
|
||||||
const obj =
|
const obj =
|
||||||
apiType.value === 'systemManage'
|
apiType.value === 'systemManage'
|
||||||
? {
|
? {
|
||||||
model_type: 'IMAGE',
|
model_type: 'IMAGE',
|
||||||
// workspace_id: workspace,
|
workspace_id: application.value?.workspace_id,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
model_type: 'IMAGE',
|
model_type: 'IMAGE',
|
||||||
|
|||||||
@ -136,12 +136,12 @@ import { set, groupBy } from 'lodash'
|
|||||||
import NodeContainer from '@/workflow/common/NodeContainer.vue'
|
import NodeContainer from '@/workflow/common/NodeContainer.vue'
|
||||||
import AIModeParamSettingDialog from '@/views/application/component/AIModeParamSettingDialog.vue'
|
import AIModeParamSettingDialog from '@/views/application/component/AIModeParamSettingDialog.vue'
|
||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import { ref, computed, onMounted } from 'vue'
|
import { ref, computed, onMounted, inject } from 'vue'
|
||||||
import { isLastNode } from '@/workflow/common/data'
|
import { isLastNode } from '@/workflow/common/data'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
||||||
|
const getApplicationDetail = inject('getApplicationDetail') as any
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -228,12 +228,13 @@ const validate = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const application = getApplicationDetail()
|
||||||
function getSelectModel() {
|
function getSelectModel() {
|
||||||
const obj =
|
const obj =
|
||||||
apiType.value === 'systemManage'
|
apiType.value === 'systemManage'
|
||||||
? {
|
? {
|
||||||
model_type: 'LLM',
|
model_type: 'LLM',
|
||||||
// workspace_id: workspace,
|
workspace_id: application.value?.workspace_id,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
model_type: 'LLM',
|
model_type: 'LLM',
|
||||||
|
|||||||
@ -184,10 +184,10 @@ import { set, cloneDeep, groupBy } from 'lodash'
|
|||||||
import NodeContainer from '@/workflow/common/NodeContainer.vue'
|
import NodeContainer from '@/workflow/common/NodeContainer.vue'
|
||||||
import NodeCascader from '@/workflow/common/NodeCascader.vue'
|
import NodeCascader from '@/workflow/common/NodeCascader.vue'
|
||||||
import ParamSettingDialog from './ParamSettingDialog.vue'
|
import ParamSettingDialog from './ParamSettingDialog.vue'
|
||||||
import { ref, computed, onMounted } from 'vue'
|
import { ref, computed, onMounted, inject } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
||||||
|
const getApplicationDetail = inject('getApplicationDetail') as any
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -251,12 +251,14 @@ const form_data = computed({
|
|||||||
function refreshParam(data: any) {
|
function refreshParam(data: any) {
|
||||||
set(props.nodeModel.properties.node_data, 'reranker_setting', data)
|
set(props.nodeModel.properties.node_data, 'reranker_setting', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const application = getApplicationDetail()
|
||||||
function getSelectModel() {
|
function getSelectModel() {
|
||||||
const obj =
|
const obj =
|
||||||
apiType.value === 'systemManage'
|
apiType.value === 'systemManage'
|
||||||
? {
|
? {
|
||||||
model_type: 'RERANKER',
|
model_type: 'RERANKER',
|
||||||
// workspace_id: workspace,
|
workspace_id: application.value?.workspace_id,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
model_type: 'RERANKER',
|
model_type: 'RERANKER',
|
||||||
|
|||||||
@ -96,18 +96,16 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import NodeContainer from '@/workflow/common/NodeContainer.vue'
|
import NodeContainer from '@/workflow/common/NodeContainer.vue'
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref, inject } from 'vue'
|
||||||
import { groupBy, set } from 'lodash'
|
import { groupBy, set } from 'lodash'
|
||||||
import NodeCascader from '@/workflow/common/NodeCascader.vue'
|
import NodeCascader from '@/workflow/common/NodeCascader.vue'
|
||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
||||||
|
const getApplicationDetail = inject('getApplicationDetail') as any
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const {
|
const {} = route as any
|
||||||
|
|
||||||
} = route as any
|
|
||||||
|
|
||||||
const apiType = computed(() => {
|
const apiType = computed(() => {
|
||||||
if (route.path.includes('resource-management')) {
|
if (route.path.includes('resource-management')) {
|
||||||
@ -161,12 +159,13 @@ const form_data = computed({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const application = getApplicationDetail()
|
||||||
function getSelectModel() {
|
function getSelectModel() {
|
||||||
const obj =
|
const obj =
|
||||||
apiType.value === 'systemManage'
|
apiType.value === 'systemManage'
|
||||||
? {
|
? {
|
||||||
model_type: 'STT',
|
model_type: 'STT',
|
||||||
// workspace_id: workspace,
|
workspace_id: application.value?.workspace_id,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
model_type: 'STT',
|
model_type: 'STT',
|
||||||
|
|||||||
@ -105,7 +105,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref, inject } from 'vue'
|
||||||
import { groupBy, set } from 'lodash'
|
import { groupBy, set } from 'lodash'
|
||||||
import NodeContainer from '@/workflow/common/NodeContainer.vue'
|
import NodeContainer from '@/workflow/common/NodeContainer.vue'
|
||||||
import TTSModeParamSettingDialog from '@/views/application/component/TTSModeParamSettingDialog.vue'
|
import TTSModeParamSettingDialog from '@/views/application/component/TTSModeParamSettingDialog.vue'
|
||||||
@ -115,7 +115,7 @@ import { MsgSuccess } from '@/utils/message'
|
|||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
||||||
|
const getApplicationDetail = inject('getApplicationDetail') as any
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -177,12 +177,13 @@ const form_data = computed({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const application = getApplicationDetail()
|
||||||
function getSelectModel() {
|
function getSelectModel() {
|
||||||
const obj =
|
const obj =
|
||||||
apiType.value === 'systemManage'
|
apiType.value === 'systemManage'
|
||||||
? {
|
? {
|
||||||
model_type: 'TTS',
|
model_type: 'TTS',
|
||||||
// workspace_id: workspace,
|
workspace_id: application.value?.workspace_id,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
model_type: 'TTS',
|
model_type: 'TTS',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user