woolball-client
Version:
Client-side library for Woolball enabling secure browser resource sharing for distributed AI task processing
11 lines (10 loc) • 467 B
TypeScript
/**
* Utility function to check if the code is running in a Node.js environment
* @returns boolean indicating if the environment is Node.js
*/
export declare function isNodeEnvironment(): boolean;
/**
* Get the appropriate device for transformers.js based on the current environment
* @returns 'cpu' for Node.js environment, 'wasm' or 'webgpu' for browser environment
*/
export declare function getTransformersDevice(defaultDevice?: 'wasm' | 'webgpu'): string;