Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions frontend/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,9 @@
"application_description": "Application description",
"cross_domain_settings": "Cross-domain settings",
"enableCustomModel": "Use specified model",
"useModel": "Use model",
"defaultModel": "Default model",
"customModel": "Specified model",
"third_party_address": "Please enter the embedded third party address,multiple items separated by semicolons",
"set_to_private": "Set as private",
"set_to_public": "Set as public",
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/i18n/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,9 @@
"application_description": "애플리케이션 설명",
"cross_domain_settings": "교차 도메인 설정",
"enableCustomModel": "지정된 모델 사용",
"useModel": "사용 모델",
"defaultModel": "기본 모델",
"customModel": "지정 모델",
"third_party_address": "임베디드할 제3자 주소를 입력하십시오, 여러 항목을 세미콜론으로 구분",
"set_to_private": "비공개로 설정",
"set_to_public": "공개로 설정",
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,9 @@
"application_description": "应用描述",
"cross_domain_settings": "跨域设置",
"enableCustomModel": "使用指定大模型",
"useModel": "使用模型",
"defaultModel": "默认模型",
"customModel": "指定模型",
"third_party_address": "请输入嵌入的第三方地址,多个以分号分割",
"set_to_private": "设为私有",
"set_to_public": "设为公共",
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/i18n/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,9 @@
"application_description": "應用描述",
"cross_domain_settings": "跨網域設定",
"enableCustomModel": "使用指定模型",
"useModel": "使用模型",
"defaultModel": "預設模型",
"customModel": "指定模型",
"third_party_address": "請輸入嵌入的第三方位址,多個以分號分割",
"set_to_private": "設為私有",
"set_to_public": "設為公共",
Expand Down
22 changes: 18 additions & 4 deletions frontend/src/views/system/embedded/iframe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,18 @@ const rules = {
trigger: 'blur',
},
],
custom_model: [
{
validator: (_: any, value: any, callback: any) => {
if (currentEmbedded.enable_custom_model && !value) {
callback(new Error(t('datasource.please_enter') + t('common.empty') + t('modelType.llm')))
} else {
callback()
}
},
trigger: 'change',
},
],
}

const dsRules = {
Expand Down Expand Up @@ -818,16 +830,18 @@ const saveHandler = () => {
/>
</el-form-item>

<el-form-item prop="enable_custom_model">
<el-checkbox v-model="currentEmbedded.enable_custom_model">
{{ t('embedded.enableCustomModel') }}
</el-checkbox>
<el-form-item prop="enable_custom_model" :label="t('embedded.useModel')">
<el-radio-group v-model="currentEmbedded.enable_custom_model">
<el-radio :value="false">{{ t('embedded.defaultModel') }}</el-radio>
<el-radio :value="true">{{ t('embedded.customModel') }}</el-radio>
</el-radio-group>
</el-form-item>

<el-form-item
v-if="currentEmbedded.enable_custom_model"
prop="custom_model"
:label="t('modelType.llm')"
required
>
<el-select v-model="currentEmbedded.custom_model" clearable filterable>
<el-option
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/views/system/model/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@ defineExpose({ showErrorMask })
<span class="type">{{ $t('model.basic_model') }}</span>
<span class="value"> {{ baseModel }}</span>
</div>
<div v-if="false" class="type-value">
<div class="type-value">
<span class="type">{{ $t('authorized_space.authorized_space') }}</span>
<span class="value" style="display: flex; align-items: center">
{{ $t('permission.2', { msg: num }) }}
<el-tooltip
v-if="false"
effect="dark"
:content="$t('authorized_space.authorized_space_list')"
placement="top"
Expand Down Expand Up @@ -184,7 +185,7 @@ defineExpose({ showErrorMask })
<style lang="less" scoped>
.card {
width: 100%;
height: 176px;
height: 206px;
border: 1px solid #dee0e3;
padding: 16px;
border-radius: 12px;
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/views/system/model/Model.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { highlightKeyword } from '@/utils/xss'
import AuthorizedWorkspaceDialogForModel from '@/views/system/workspace/AuthorizedWorkspaceDialogForModel.vue'

interface Model {
ws_mapping_count: number | undefined
name: string
model_type: string
base_model: string
Expand Down Expand Up @@ -397,6 +398,7 @@ const submit = (item: any) => {
:ref="(el: any) => setCardRef(el, index)"
:key="ele.id"
:name="ele.name"
:num="ele.ws_mapping_count"
:supplier="ele.supplier"
:model-type="getModelTypeName(ele['model_type'])"
:base-model="ele['base_model']"
Expand Down
Loading