feat(asr): add ASR model connection check and update related components
- Implemented a new function to check ASR model connectivity via the /v1/audio/transcriptions endpoint. - Updated ModelEditorDialog.vue to integrate ASR model checks and adjust UI elements accordingly. - Enhanced localization files to reflect changes in ASR terminology and descriptions. - Added ASR configuration options to the knowledge base and updated related migration scripts. - Refactored model handling to support ASR as a distinct model type in the application.
This commit is contained in:
@@ -313,6 +313,27 @@ export function checkRerankModel(modelConfig: {
|
||||
});
|
||||
}
|
||||
|
||||
// 检查 ASR 模型连接(通过 /v1/audio/transcriptions 端点测试)
|
||||
export function checkASRModel(modelConfig: {
|
||||
modelName: string;
|
||||
baseUrl: string;
|
||||
apiKey?: string;
|
||||
}): Promise<{
|
||||
available: boolean;
|
||||
message?: string;
|
||||
}> {
|
||||
return new Promise((resolve, reject) => {
|
||||
post('/api/v1/initialization/asr/check', modelConfig)
|
||||
.then((response: any) => {
|
||||
resolve(response.data || {});
|
||||
})
|
||||
.catch((error: any) => {
|
||||
console.error('Failed to check ASR model:', error);
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export function testMultimodalFunction(testData: {
|
||||
image: File;
|
||||
vlm_model: string;
|
||||
|
||||
Reference in New Issue
Block a user