fix(ui): 统一工具名称显示并调整默认语言设置
将工具名称从英文改为中文显示,并移除查询文本的引号 调整语言选项顺序并将默认语言设置为中文 将Milvus显示名称改为CommonRAG
This commit is contained in:
parent
e0f7d3dc14
commit
2271555a11
@ -4,7 +4,7 @@
|
|||||||
<div class="sep-header">
|
<div class="sep-header">
|
||||||
<span class="note">{{ operationLabel }}</span>
|
<span class="note">{{ operationLabel }}</span>
|
||||||
<span class="separator" v-if="queryText">|</span>
|
<span class="separator" v-if="queryText">|</span>
|
||||||
<span class="description">"{{ queryText }}"</span>
|
<span class="description">{{ queryText }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #result="{ resultContent }">
|
<template #result="{ resultContent }">
|
||||||
@ -146,6 +146,10 @@ const args = computed(() => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const toolName = computed(() => {
|
||||||
|
return props.toolCall.name || props.toolCall.function?.name || '知识库';
|
||||||
|
});
|
||||||
|
|
||||||
// 获取操作类型
|
// 获取操作类型
|
||||||
const operation = computed(() => {
|
const operation = computed(() => {
|
||||||
return args.value.operation || 'search';
|
return args.value.operation || 'search';
|
||||||
@ -154,8 +158,8 @@ const operation = computed(() => {
|
|||||||
// 获取操作标签
|
// 获取操作标签
|
||||||
const operationLabel = computed(() => {
|
const operationLabel = computed(() => {
|
||||||
const labels = {
|
const labels = {
|
||||||
search: `${props.toolCall.name} 搜索`,
|
search: `${toolName.value} 搜索`,
|
||||||
get_mindmap: props.toolCall.name
|
get_mindmap: toolName.value
|
||||||
};
|
};
|
||||||
return labels[operation.value] || operation.value;
|
return labels[operation.value] || operation.value;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<BaseToolCall :tool-call="toolCall" :hide-params="true">
|
<BaseToolCall :tool-call="toolCall" :hide-params="true">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="sep-header">
|
<div class="sep-header">
|
||||||
<span class="note">knowledgegraph</span>
|
<span class="note">知识图谱</span>
|
||||||
<span class="separator" v-if="query">|</span>
|
<span class="separator" v-if="query">|</span>
|
||||||
<span class="description">{{ query }}</span>
|
<span class="description">{{ query }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
<BaseToolCall :tool-call="toolCall" :hide-params="true">
|
<BaseToolCall :tool-call="toolCall" :hide-params="true">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="sep-header">
|
<div class="sep-header">
|
||||||
<span class="note">websearch</span>
|
<span class="note">网络搜索</span>
|
||||||
<span class="separator" v-if="query">|</span>
|
<span class="separator" v-if="query">|</span>
|
||||||
<span class="description">"{{ query }}"</span>
|
<span class="description">{{ query }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #result="{ resultContent }">
|
<template #result="{ resultContent }">
|
||||||
|
|||||||
@ -260,8 +260,8 @@ const state = reactive({
|
|||||||
|
|
||||||
// 语言选项(值使用英文,以保证后端/LightRAG 兼容;标签为中英文方便理解)
|
// 语言选项(值使用英文,以保证后端/LightRAG 兼容;标签为中英文方便理解)
|
||||||
const languageOptions = [
|
const languageOptions = [
|
||||||
{ label: '英语 English', value: 'English' },
|
|
||||||
{ label: '中文 Chinese', value: 'Chinese' },
|
{ label: '中文 Chinese', value: 'Chinese' },
|
||||||
|
{ label: '英语 English', value: 'English' },
|
||||||
{ label: '日语 Japanese', value: 'Japanese' },
|
{ label: '日语 Japanese', value: 'Japanese' },
|
||||||
{ label: '韩语 Korean', value: 'Korean' },
|
{ label: '韩语 Korean', value: 'Korean' },
|
||||||
{ label: '德语 German', value: 'German' },
|
{ label: '德语 German', value: 'German' },
|
||||||
@ -280,7 +280,7 @@ const createEmptyDatabaseForm = () => ({
|
|||||||
kb_type: 'milvus',
|
kb_type: 'milvus',
|
||||||
is_private: false,
|
is_private: false,
|
||||||
storage: '',
|
storage: '',
|
||||||
language: 'English',
|
language: 'Chinese',
|
||||||
llm_info: {
|
llm_info: {
|
||||||
provider: '',
|
provider: '',
|
||||||
model_name: ''
|
model_name: ''
|
||||||
@ -396,7 +396,7 @@ const getKbTypeLabel = (type) => {
|
|||||||
const labels = {
|
const labels = {
|
||||||
lightrag: 'LightRAG',
|
lightrag: 'LightRAG',
|
||||||
chroma: 'Chroma',
|
chroma: 'Chroma',
|
||||||
milvus: 'Milvus'
|
milvus: 'CommonRAG'
|
||||||
}
|
}
|
||||||
return labels[type] || type
|
return labels[type] || type
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user