We demonstrate on-chip quantum random number generation at high data rates using the random phases of gain-switched laser pulses. Interference of the gain-switched pulses produced by two independent semiconductor lasers is performed on a photonic integrated circuit (PIC) and the resulting pulse train is received and processed in real-time using homebuilt capture electronics consisting a field programmable gate array (FPGA) and a 10-bit digitizer. Random numbers with low correlation coefficient are shown for pulse clock rates of 1 GHz and data rates of 8 Gbps. The random numbers are also shown to successfully pass all tests within the National Institute for Standards and Technology (NIST) test suite. The system provides genuine random numbers in a compact platform that can be readily integrated into existing quantum cryptographic technology.