import { RequestApiError } from "@imengyu/imengyu-utils";

export const ChatUtils = {
  formatError(error: any) {
    if (error instanceof RequestApiError) 
      return error.toStringDetail();
    if (error instanceof Error) 
      return error.message;
    return String(error);
  },
  
}