mirror of
https://github.com/THU-MAIC/OpenMAIC.git
synced 2026-10-02 09:24:43 +08:00
* feat(providers): uniform capability force-off and consistent missing-key contract * fix(providers): close force-off bypasses found in review
11 lines
419 B
TypeScript
11 lines
419 B
TypeScript
export interface ASRServerControl {
|
|
serverDisabled?: boolean;
|
|
}
|
|
|
|
export const ASR_SERVER_DISABLED_MESSAGE = 'This ASR provider is disabled by the server';
|
|
|
|
/** Server force-off takes precedence even for ASR that executes entirely in the browser. */
|
|
export function getASRServerDisabledError(config?: ASRServerControl): string | undefined {
|
|
return config?.serverDisabled ? ASR_SERVER_DISABLED_MESSAGE : undefined;
|
|
}
|