We compute the expected luminosity function of GRBs in the context of the internal shock model . We assume that GRB central engines generate relativistic outflows characterized by the respective distributions of injected kinetic power \dot { E } and contrast in Lorentz factor \kappa = \Gamma _ { max } / \Gamma _ { min } . We find that if the distribution of contrast extends down to values close to unity ( i.e . if both highly variable and smooth outflows can exist ) the luminosity function has two branches . At high luminosity it follows the distribution of \dot { E } while at low luminosity it is close to a power law of slope -0.5 . We then examine if existing data can constrain the luminosity function . Using the \log { N } - \log { P } curve , the E _ { p } distribution of bright BATSE bursts and the XRF/GRB ratio obtained by HETE2 we show that single and broken power-laws can provide equally good fits of these data . Present observations are therefore unable to favor one form of the other . However when a broken power-law is adopted they clearly indicate a low luminosity slope \simeq - 0.6 \pm 0.2 , compatible with the prediction of the internal shock model .