mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
feat: mobile 角色配置添加小参数模型选项
This commit is contained in:
@@ -28,6 +28,7 @@ export interface AgentDetail {
|
||||
asrModelId: string
|
||||
vadModelId: string
|
||||
llmModelId: string
|
||||
slmModelId: string
|
||||
vllmModelId: string
|
||||
ttsModelId: string
|
||||
ttsVoiceId: string
|
||||
|
||||
@@ -3,6 +3,7 @@ export interface ChatSession {
|
||||
sessionId: string
|
||||
createdAt: string
|
||||
chatCount: number
|
||||
title: string
|
||||
}
|
||||
|
||||
// 聊天会话列表响应
|
||||
|
||||
@@ -108,7 +108,8 @@ export default {
|
||||
'agent.modelConfig': 'Modellkonfiguration',
|
||||
'agent.vad': 'Sprachaktivitätserkennung',
|
||||
'agent.asr': 'Spracherkennung',
|
||||
'agent.llm': 'Großes Sprachmodell',
|
||||
'agent.llm': 'Hauptsprachenmodell',
|
||||
'agent.slm': 'Kleine Parametermodelle',
|
||||
'agent.vllm': 'Vision-Sprachmodell',
|
||||
'agent.intent': 'Absichtserkennung',
|
||||
'agent.memory': 'Speicher',
|
||||
|
||||
@@ -108,7 +108,8 @@ export default {
|
||||
'agent.modelConfig': 'Model Configuration',
|
||||
'agent.vad': 'Voice Activity Detection',
|
||||
'agent.asr': 'Speech Recognition',
|
||||
'agent.llm': 'Large Language Model',
|
||||
'agent.llm': 'Main language model',
|
||||
'agent.slm': 'Small parameter model',
|
||||
'agent.vllm': 'Vision Language Model',
|
||||
'agent.intent': 'Intent Recognition',
|
||||
'agent.memory': 'Memory',
|
||||
|
||||
@@ -108,7 +108,8 @@ export default {
|
||||
'agent.modelConfig': 'Configuração do Modelo',
|
||||
'agent.vad': 'Detecção de Atividade de Voz',
|
||||
'agent.asr': 'Reconhecimento de Fala',
|
||||
'agent.llm': 'Modelo de Linguagem Grande',
|
||||
'agent.llm': 'Modelo de Linguagem Principal',
|
||||
'agent.slm': 'Modelo de pequenos parâmetros',
|
||||
'agent.vllm': 'Modelo de Linguagem Visual',
|
||||
'agent.intent': 'Reconhecimento de Intenção',
|
||||
'agent.memory': 'Memória',
|
||||
|
||||
@@ -108,7 +108,8 @@ export default {
|
||||
'agent.modelConfig': 'Cấu hình mô hình',
|
||||
'agent.vad': 'Phát hiện hoạt động giọng nói',
|
||||
'agent.asr': 'Nhận dạng giọng nói',
|
||||
'agent.llm': 'Mô hình ngôn ngữ lớn',
|
||||
'agent.llm': 'Mô hình ngôn ngữ chính',
|
||||
'agent.slm': 'Mô hình tham số nhỏ',
|
||||
'agent.vllm': 'Mô hình ngôn ngữ thị giác',
|
||||
'agent.intent': 'Nhận dạng ý định',
|
||||
'agent.memory': 'Bộ nhớ',
|
||||
|
||||
@@ -108,7 +108,8 @@ export default {
|
||||
'agent.modelConfig': '模型配置',
|
||||
'agent.vad': '语音活动检测',
|
||||
'agent.asr': '语音识别',
|
||||
'agent.llm': '大语言模型',
|
||||
'agent.llm': '主语言模型',
|
||||
'agent.slm': '小参数模型',
|
||||
'agent.vllm': '视觉大模型',
|
||||
'agent.intent': '意图识别',
|
||||
'agent.memory': '记忆',
|
||||
|
||||
@@ -129,7 +129,8 @@ export default {
|
||||
'agent.modelConfig': '模型配置',
|
||||
'agent.vad': '語音活動檢測',
|
||||
'agent.asr': '語音識別',
|
||||
'agent.llm': '大語言模型',
|
||||
'agent.llm': '主語言模型',
|
||||
'agent.slm': '小參數模型',
|
||||
'agent.vllm': '視覺大模型',
|
||||
'agent.intent': '意圖識別',
|
||||
'agent.memory': '記憶',
|
||||
|
||||
@@ -29,6 +29,7 @@ const formData = ref<Partial<AgentDetail>>({
|
||||
vadModelId: '',
|
||||
asrModelId: '',
|
||||
llmModelId: '',
|
||||
slmModelId: '',
|
||||
vllmModelId: '',
|
||||
intentModelId: '',
|
||||
memModelId: '',
|
||||
@@ -46,6 +47,7 @@ const displayNames = ref({
|
||||
vad: t('agent.pleaseSelect'),
|
||||
asr: t('agent.pleaseSelect'),
|
||||
llm: t('agent.pleaseSelect'),
|
||||
slm: t('agent.pleaseSelect'),
|
||||
vllm: t('agent.pleaseSelect'),
|
||||
intent: t('agent.pleaseSelect'),
|
||||
memory: t('agent.pleaseSelect'),
|
||||
@@ -94,6 +96,7 @@ const pickerShow = ref<{
|
||||
vad: false,
|
||||
asr: false,
|
||||
llm: false,
|
||||
slm: false,
|
||||
vllm: false,
|
||||
intent: false,
|
||||
memory: false,
|
||||
@@ -272,6 +275,7 @@ function updateDisplayNames() {
|
||||
displayNames.value.vad = getModelDisplayName('VAD', formData.value.vadModelId)
|
||||
displayNames.value.asr = getModelDisplayName('ASR', formData.value.asrModelId)
|
||||
displayNames.value.llm = getModelDisplayName('LLM', formData.value.llmModelId)
|
||||
displayNames.value.slm = getModelDisplayName('LLM', formData.value.slmModelId)
|
||||
displayNames.value.vllm = getModelDisplayName('VLLM', formData.value.vllmModelId)
|
||||
displayNames.value.intent = getModelDisplayName('Intent', formData.value.intentModelId)
|
||||
displayNames.value.memory = getModelDisplayName('Memory', formData.value.memModelId)
|
||||
@@ -437,6 +441,7 @@ function selectRoleTemplate(templateId: string) {
|
||||
vadModelId: template.vadModelId || formData.value.vadModelId,
|
||||
asrModelId: template.asrModelId || formData.value.asrModelId,
|
||||
llmModelId: template.llmModelId || formData.value.llmModelId,
|
||||
slmModelId: template.llmModelId || formData.value.slmModelId,
|
||||
vllmModelId: template.vllmModelId || formData.value.vllmModelId,
|
||||
intentModelId: template.intentModelId || formData.value.intentModelId,
|
||||
memModelId: template.memModelId || formData.value.memModelId,
|
||||
@@ -474,6 +479,9 @@ async function onPickerConfirm(type: string, value: any, name: string) {
|
||||
case 'llm':
|
||||
formData.value.llmModelId = value
|
||||
break
|
||||
case 'slm':
|
||||
formData.value.slmModelId = value
|
||||
break
|
||||
case 'vllm':
|
||||
formData.value.vllmModelId = value
|
||||
break
|
||||
@@ -490,7 +498,8 @@ async function onPickerConfirm(type: string, value: any, name: string) {
|
||||
if (value === 'Memory_nomem' || value === 'Memory_mem_report_only') {
|
||||
tempSummaryMemory.value = formData.value.summaryMemory
|
||||
formData.value.summaryMemory = ''
|
||||
} else if (tempSummaryMemory.value !== '' && formData.value.summaryMemory === '') {
|
||||
}
|
||||
else if (tempSummaryMemory.value !== '' && formData.value.summaryMemory === '') {
|
||||
formData.value.summaryMemory = tempSummaryMemory.value
|
||||
tempSummaryMemory.value = ''
|
||||
}
|
||||
@@ -839,6 +848,16 @@ onMounted(async () => {
|
||||
<wd-icon name="arrow-right" custom-class="text-[20rpx] text-[#9d9ea3]" />
|
||||
</view>
|
||||
|
||||
<view class="flex cursor-pointer items-center justify-between border border-[#eeeeee] rounded-[12rpx] bg-[#f5f7fb] p-[20rpx] transition-all duration-300 active:bg-[#eef3ff]" @click="openPicker('slm')">
|
||||
<text class="text-[28rpx] text-[#232338] font-medium">
|
||||
{{ t('agent.slm') }}
|
||||
</text>
|
||||
<text class="mx-[16rpx] flex-1 text-right text-[26rpx] text-[#65686f]">
|
||||
{{ displayNames.slm }}
|
||||
</text>
|
||||
<wd-icon name="arrow-right" custom-class="text-[20rpx] text-[#9d9ea3]" />
|
||||
</view>
|
||||
|
||||
<view class="flex cursor-pointer items-center justify-between border border-[#eeeeee] rounded-[12rpx] bg-[#f5f7fb] p-[20rpx] transition-all duration-300 active:bg-[#eef3ff]" @click="openPicker('vllm')">
|
||||
<text class="text-[28rpx] text-[#232338] font-medium">
|
||||
{{ t('agent.vllm') }}
|
||||
@@ -995,6 +1014,13 @@ onMounted(async () => {
|
||||
@select="({ item }) => onPickerConfirm('llm', item.value, item.name)"
|
||||
/>
|
||||
|
||||
<wd-action-sheet
|
||||
v-model="pickerShow.slm"
|
||||
:actions="modelOptions.LLM && modelOptions.LLM.map(item => ({ name: item.modelName, value: item.id }))"
|
||||
@close="onPickerCancel('slm')"
|
||||
@select="({ item }) => onPickerConfirm('slm', item.value, item.name)"
|
||||
/>
|
||||
|
||||
<wd-action-sheet
|
||||
v-model="pickerShow.vllm"
|
||||
:actions="modelOptions.VLLM && modelOptions.VLLM.map(item => ({ name: item.modelName, value: item.id }))"
|
||||
|
||||
Reference in New Issue
Block a user