Files
Jammy 52636c91ae
Some checks failed
CI / main (push) Has been cancelled
CI / release-e2e (push) Has been cancelled
Track bundled vendor runtime sources
2026-07-07 10:05:50 +08:00

16 lines
411 B
TypeScript

import { t } from "../config/lang";
export const AigcServerUtil = {
errorDetect: (data: string): string | null => {
const errorMap = {
"torch.cuda.OutOfMemoryError": t("CUDA内存不足"),
};
for (const [key, value] of Object.entries(errorMap)) {
if (data.includes(key)) {
return value;
}
}
return null;
},
};