feat(asr): integrate Automatic Speech Recognition (ASR) support

- Added ASR configuration options to the knowledge base and model settings.
- Implemented ASR model selection and transcription capabilities in the knowledge processing pipeline.
- Enhanced file upload support to include audio formats for ASR processing.
- Updated localization files to include ASR-related labels and descriptions.
- Refactored model handling to accommodate ASR as a new model type.
This commit is contained in:
wizardchen
2026-04-02 16:43:37 +08:00
committed by lyingbug
parent d68c94a11a
commit 624e24ba49
30 changed files with 652 additions and 35 deletions
+2
View File
@@ -32,12 +32,14 @@ func (p *AliyunProvider) Info() ProviderInfo {
types.ModelTypeEmbedding: AliyunChatBaseURL,
types.ModelTypeRerank: AliyunRerankBaseURL,
types.ModelTypeVLLM: AliyunChatBaseURL,
types.ModelTypeASR: AliyunChatBaseURL,
},
ModelTypes: []types.ModelType{
types.ModelTypeKnowledgeQA,
types.ModelTypeEmbedding,
types.ModelTypeRerank,
types.ModelTypeVLLM,
types.ModelTypeASR,
},
RequiresAuth: true,
}
+1
View File
@@ -25,6 +25,7 @@ func (p *GenericProvider) Info() ProviderInfo {
types.ModelTypeEmbedding,
types.ModelTypeRerank,
types.ModelTypeVLLM,
types.ModelTypeASR,
},
RequiresAuth: false, // 可能需要也可能不需要
}
+2
View File
@@ -31,12 +31,14 @@ func (p *GPUStackProvider) Info() ProviderInfo {
types.ModelTypeEmbedding: GPUStackBaseURL,
types.ModelTypeRerank: GPUStackRerankBaseURL,
types.ModelTypeVLLM: GPUStackBaseURL,
types.ModelTypeASR: GPUStackBaseURL,
},
ModelTypes: []types.ModelType{
types.ModelTypeKnowledgeQA,
types.ModelTypeEmbedding,
types.ModelTypeRerank,
types.ModelTypeVLLM,
types.ModelTypeASR,
},
RequiresAuth: true, // GPUStack 需要 API Key
}
+2
View File
@@ -28,12 +28,14 @@ func (p *OpenAIProvider) Info() ProviderInfo {
types.ModelTypeEmbedding: OpenAIBaseURL,
types.ModelTypeRerank: OpenAIBaseURL,
types.ModelTypeVLLM: OpenAIBaseURL,
types.ModelTypeASR: OpenAIBaseURL,
},
ModelTypes: []types.ModelType{
types.ModelTypeKnowledgeQA,
types.ModelTypeEmbedding,
types.ModelTypeRerank,
types.ModelTypeVLLM,
types.ModelTypeASR,
},
RequiresAuth: true,
}
+2
View File
@@ -28,12 +28,14 @@ func (p *SiliconFlowProvider) Info() ProviderInfo {
types.ModelTypeEmbedding: SiliconFlowBaseURL,
types.ModelTypeRerank: SiliconFlowBaseURL,
types.ModelTypeVLLM: SiliconFlowBaseURL,
types.ModelTypeASR: SiliconFlowBaseURL,
},
ModelTypes: []types.ModelType{
types.ModelTypeKnowledgeQA,
types.ModelTypeEmbedding,
types.ModelTypeRerank,
types.ModelTypeVLLM,
types.ModelTypeASR,
},
RequiresAuth: true,
}