fix: tts stream error

This commit is contained in:
jialin
2026-04-29 20:51:48 +08:00
committed by jialin
parent 7794e57bb1
commit ab89ddffc8
6 changed files with 71 additions and 137 deletions
+2 -2
View File
@@ -15,6 +15,7 @@ import {
} from '@gpustack/core-ui';
import { useIntl } from '@umijs/max';
import { Button, Spin, Tooltip } from 'antd';
import _ from 'lodash';
import React, {
forwardRef,
useCallback,
@@ -163,10 +164,9 @@ const GroundSTT: React.FC<MessageProps> = forwardRef((props, ref) => {
await nonStreamSTT.generate(params, getCanceltToken());
}
} catch (error: any) {
console.log('error:', error);
setTokenResult({
error: true,
errorMessage: error?.message || 'Unknown error'
errorMessage: error?.message || _.toString(error)
});
} finally {
setLoading(false);