feat: multi-language support for agent search and admin pipeline config
- search_agents now accepts output_language parameter (en/zh-TW/ja) - Admin Settings: added Pipeline Configuration section (enabled, max_concurrent_stages, default_timeout_secs) - Admin Settings: search config now includes vlm_output_language dropdown - Added translations for pipeline config in en/zh-TW/ja locales - Agent search uses searchConfig.vlm_output_language for output language
This commit is contained in:
Binary file not shown.
@@ -301,6 +301,7 @@ case 'search_keyword': {
|
|||||||
case 'search_agents': {
|
case 'search_agents': {
|
||||||
const body: any = { query: a.query }
|
const body: any = { query: a.query }
|
||||||
if (a.conversationId) body.conversation_id = a.conversationId
|
if (a.conversationId) body.conversation_id = a.conversationId
|
||||||
|
if (a.outputLanguage) body.output_language = a.outputLanguage
|
||||||
return { url: '/api/v1/agents/search', method: 'POST', body, timeout: 180000 }
|
return { url: '/api/v1/agents/search', method: 'POST', body, timeout: 180000 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -413,6 +413,7 @@
|
|||||||
"processorConfig": "Processor Configuration",
|
"processorConfig": "Processor Configuration",
|
||||||
"filterConfig": "Filter Configuration",
|
"filterConfig": "Filter Configuration",
|
||||||
"searchConfig": "Search Configuration",
|
"searchConfig": "Search Configuration",
|
||||||
|
"pipelineConfig": "Pipeline Configuration",
|
||||||
"systemConfig": "System Configuration",
|
"systemConfig": "System Configuration",
|
||||||
"uploadPath": "Upload Path",
|
"uploadPath": "Upload Path",
|
||||||
"serviceUrls": "Service URLs"
|
"serviceUrls": "Service URLs"
|
||||||
@@ -448,6 +449,26 @@
|
|||||||
"stat": {
|
"stat": {
|
||||||
"users": "Users",
|
"users": "Users",
|
||||||
"shares": "Shares"
|
"shares": "Shares"
|
||||||
|
},
|
||||||
|
"vlm": {
|
||||||
|
"minScore": "VLM Min Score",
|
||||||
|
"maxResults": "VLM Max Results",
|
||||||
|
"outputLanguage": "Output Language",
|
||||||
|
"hint": {
|
||||||
|
"minScore": "Minimum similarity score for VLM search",
|
||||||
|
"maxResults": "Maximum number of VLM search results",
|
||||||
|
"outputLanguage": "Language for VLM descriptions"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pipeline": {
|
||||||
|
"enabled": "Enabled",
|
||||||
|
"maxConcurrentStages": "Max Concurrent Stages",
|
||||||
|
"defaultTimeoutSecs": "Default Timeout (seconds)",
|
||||||
|
"hint": {
|
||||||
|
"enabled": "Enable pipeline processing",
|
||||||
|
"maxConcurrentStages": "Maximum number of stages to run concurrently",
|
||||||
|
"defaultTimeoutSecs": "Default timeout for pipeline execution"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"app": {
|
"app": {
|
||||||
|
|||||||
@@ -445,6 +445,26 @@
|
|||||||
"stat": {
|
"stat": {
|
||||||
"users": "ユーザー",
|
"users": "ユーザー",
|
||||||
"shares": "共有"
|
"shares": "共有"
|
||||||
|
},
|
||||||
|
"vlm": {
|
||||||
|
"minScore": "VLM 最小スコア",
|
||||||
|
"maxResults": "VLM 最大結果数",
|
||||||
|
"outputLanguage": "出力言語",
|
||||||
|
"hint": {
|
||||||
|
"minScore": "VLM検索の最小類似度スコア",
|
||||||
|
"maxResults": "VLM検索の最大結果数",
|
||||||
|
"outputLanguage": "VLM説明の言語"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pipeline": {
|
||||||
|
"enabled": "有効",
|
||||||
|
"maxConcurrentStages": "最大並列ステージ数",
|
||||||
|
"defaultTimeoutSecs": "デフォルトタイムアウト(秒)",
|
||||||
|
"hint": {
|
||||||
|
"enabled": "パイプライン処理を有効化",
|
||||||
|
"maxConcurrentStages": "同時に実行する最大ステージ数",
|
||||||
|
"defaultTimeoutSecs": "パイプライン実行のデフォルトタイムアウト"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"app": {
|
"app": {
|
||||||
|
|||||||
@@ -448,6 +448,26 @@
|
|||||||
"stat": {
|
"stat": {
|
||||||
"users": "用戶",
|
"users": "用戶",
|
||||||
"shares": "共享"
|
"shares": "共享"
|
||||||
|
},
|
||||||
|
"vlm": {
|
||||||
|
"minScore": "VLM 最低分數",
|
||||||
|
"maxResults": "VLM 最大結果數",
|
||||||
|
"outputLanguage": "輸出語言",
|
||||||
|
"hint": {
|
||||||
|
"minScore": "VLM 搜尋的最低相似度分數",
|
||||||
|
"maxResults": "VLM 搜尋的最大結果數量",
|
||||||
|
"outputLanguage": "VLM 描述的語言"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pipeline": {
|
||||||
|
"enabled": "啟用",
|
||||||
|
"maxConcurrentStages": "最大並行階段數",
|
||||||
|
"defaultTimeoutSecs": "預設超時(秒)",
|
||||||
|
"hint": {
|
||||||
|
"enabled": "啟用管線處理",
|
||||||
|
"maxConcurrentStages": "同時執行的最大階段數",
|
||||||
|
"defaultTimeoutSecs": "管線執行的預設超時時間"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"app": {
|
"app": {
|
||||||
|
|||||||
@@ -408,6 +408,44 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Pipeline Config Section -->
|
||||||
|
<div class="config-section">
|
||||||
|
<h3 class="config-section-title" @click="toggleSection('pipeline')">
|
||||||
|
<span class="config-section-arrow">{{ expandedSections.pipeline ? '▼' : '▶' }}</span>
|
||||||
|
{{ t('admin.section.pipelineConfig') }}
|
||||||
|
</h3>
|
||||||
|
<div v-if="expandedSections.pipeline" class="config-section-content">
|
||||||
|
<div class="config-field config-field-inline">
|
||||||
|
<label>{{ t('admin.pipeline.enabled') }}</label>
|
||||||
|
<input type="checkbox" v-model="pipelineConfig.enabled" />
|
||||||
|
<span class="config-hint">{{ t('admin.pipeline.hint.enabled') }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="config-field config-field-inline">
|
||||||
|
<label>{{ t('admin.pipeline.maxConcurrentStages') }}</label>
|
||||||
|
<input
|
||||||
|
class="config-input"
|
||||||
|
type="number"
|
||||||
|
step="1"
|
||||||
|
min="1"
|
||||||
|
max="10"
|
||||||
|
v-model.number="pipelineConfig.max_concurrent_stages"
|
||||||
|
/>
|
||||||
|
<span class="config-hint">{{ t('admin.pipeline.hint.maxConcurrentStages') }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="config-field config-field-inline">
|
||||||
|
<label>{{ t('admin.pipeline.defaultTimeoutSecs') }}</label>
|
||||||
|
<input
|
||||||
|
class="config-input"
|
||||||
|
type="number"
|
||||||
|
step="60"
|
||||||
|
min="60"
|
||||||
|
v-model.number="pipelineConfig.default_timeout_secs"
|
||||||
|
/>
|
||||||
|
<span class="config-hint">{{ t('admin.pipeline.hint.defaultTimeoutSecs') }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- System Config Section -->
|
<!-- System Config Section -->
|
||||||
<div class="config-section">
|
<div class="config-section">
|
||||||
<h3 class="config-section-title" @click="toggleSection('sys')">
|
<h3 class="config-section-title" @click="toggleSection('sys')">
|
||||||
@@ -1130,7 +1168,7 @@ const configSaving = ref(false)
|
|||||||
const configError = ref('')
|
const configError = ref('')
|
||||||
const configSaveMsg = ref('')
|
const configSaveMsg = ref('')
|
||||||
const configSaveOk = ref(false)
|
const configSaveOk = ref(false)
|
||||||
const expandedSections = ref({ vlm: true, llm: true, proc: true, filter: true, search: true, sys: false, lang: false })
|
const expandedSections = ref({ vlm: true, llm: true, proc: true, filter: true, search: true, pipeline: false, sys: false, lang: false })
|
||||||
|
|
||||||
const vlmPrompts = ref<Record<string, any>>({})
|
const vlmPrompts = ref<Record<string, any>>({})
|
||||||
const llmConfig = ref<Record<string, any>>({})
|
const llmConfig = ref<Record<string, any>>({})
|
||||||
@@ -1142,6 +1180,11 @@ const searchConfig = ref<Record<string, any>>({
|
|||||||
vlm_max_results: 5,
|
vlm_max_results: 5,
|
||||||
vlm_output_language: 'en'
|
vlm_output_language: 'en'
|
||||||
})
|
})
|
||||||
|
const pipelineConfig = ref<Record<string, any>>({
|
||||||
|
enabled: false,
|
||||||
|
max_concurrent_stages: 3,
|
||||||
|
default_timeout_secs: 3600
|
||||||
|
})
|
||||||
|
|
||||||
function toggleSection(section: string) {
|
function toggleSection(section: string) {
|
||||||
expandedSections.value[section] = !expandedSections.value[section]
|
expandedSections.value[section] = !expandedSections.value[section]
|
||||||
@@ -1188,6 +1231,7 @@ async function loadConfig() {
|
|||||||
filterConfig.value = data.filter_config || {}
|
filterConfig.value = data.filter_config || {}
|
||||||
systemConfig.value = data.system_config || {}
|
systemConfig.value = data.system_config || {}
|
||||||
searchConfig.value = data.search || { vlm_min_score: 0.0, vlm_max_results: 5, vlm_output_language: 'en' }
|
searchConfig.value = data.search || { vlm_min_score: 0.0, vlm_max_results: 5, vlm_output_language: 'en' }
|
||||||
|
pipelineConfig.value = data.pipeline || { enabled: false, max_concurrent_stages: 3, default_timeout_secs: 3600 }
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
configError.value = 'Failed to load config: ' + (e.message || e)
|
configError.value = 'Failed to load config: ' + (e.message || e)
|
||||||
} finally {
|
} finally {
|
||||||
@@ -1215,6 +1259,11 @@ async function saveConfig() {
|
|||||||
vlm_max_results: searchConfig.value.vlm_max_results || 5,
|
vlm_max_results: searchConfig.value.vlm_max_results || 5,
|
||||||
vlm_output_language: searchConfig.value.vlm_output_language || 'en'
|
vlm_output_language: searchConfig.value.vlm_output_language || 'en'
|
||||||
},
|
},
|
||||||
|
pipeline: {
|
||||||
|
enabled: pipelineConfig.value.enabled ?? false,
|
||||||
|
max_concurrent_stages: pipelineConfig.value.max_concurrent_stages || 3,
|
||||||
|
default_timeout_secs: pipelineConfig.value.default_timeout_secs || 3600
|
||||||
|
},
|
||||||
}
|
}
|
||||||
const saveRes = await fetch('/api/v1/admin/config', {
|
const saveRes = await fetch('/api/v1/admin/config', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|||||||
@@ -815,6 +815,7 @@ async function sendMessage() {
|
|||||||
const res: any = await apiCall('search_agents', {
|
const res: any = await apiCall('search_agents', {
|
||||||
query: q,
|
query: q,
|
||||||
conversationId: conversationId.value || null,
|
conversationId: conversationId.value || null,
|
||||||
|
outputLanguage: searchConfig.value.vlm_output_language || 'en',
|
||||||
})
|
})
|
||||||
if (searchSeq !== seq) return
|
if (searchSeq !== seq) return
|
||||||
if (res?.conversation_id) conversationId.value = res.conversation_id
|
if (res?.conversation_id) conversationId.value = res.conversation_id
|
||||||
|
|||||||
Reference in New Issue
Block a user