Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
import type { FlowV2 } from '../declarative-flow/internals/types';
/**
* Add utility functions to the flow object. This frees the API consumers from making these functions themselves.
* @param flow the flow.
* @returns the enhanced flow.
*/
export function enhanceFlowWithUtilityFunctions< T extends FlowV2< any > >( flow: T ): T {
flow.getSteps = () => {
return flow.__flowSteps ?? [];
};
return flow;
}