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:
@@ -483,18 +483,12 @@ func (s *modelService) GetASRModel(ctx context.Context, modelId string) (asr.ASR
|
||||
|
||||
logger.Infof(ctx, "Getting ASR model: %s, source: %s", model.Name, model.Source)
|
||||
|
||||
ifType := model.Parameters.InterfaceType
|
||||
if ifType == "" {
|
||||
ifType = "openai"
|
||||
}
|
||||
|
||||
sttModel, err := asr.NewASR(&asr.Config{
|
||||
ModelID: model.ID,
|
||||
APIKey: model.Parameters.APIKey,
|
||||
BaseURL: model.Parameters.BaseURL,
|
||||
ModelName: model.Name,
|
||||
Source: model.Source,
|
||||
InterfaceType: ifType,
|
||||
ModelID: model.ID,
|
||||
APIKey: model.Parameters.APIKey,
|
||||
BaseURL: model.Parameters.BaseURL,
|
||||
ModelName: model.Name,
|
||||
Source: model.Source,
|
||||
})
|
||||
if err != nil {
|
||||
logger.ErrorWithFields(ctx, err, map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user