In separate experiments, we performed phase-matched sum-frequency generation (SFG) and phase-matched second-harmonic generation (SHG) of the optical waves inside an optical parametric oscillator (OPO). The OPO is synchronously pumped and is based on AgGaS2. The pump wavelength is at 1.064 micrometers , and the signal and the idler wavelengths are tunable around 1.319 micrometers and 5.505 micrometers , respectively. Intracavity SFG between the 1.064-micrometers and the oscillating 1.319-micrometers waves produces yellow radiation near 0.589 micrometers ; while, intracavity SHG of the 1.319- micrometers wave generates red radiation near 0.660 micrometers . Several KTP crystals are tried in the SFG experiment. A 8.5-mm long KTP crystal, cut at (theta) equals 79 degree(s) and (phi) equals 0 degree(s), yields a 10.5% energy conversion from the infrared pump to the yellow radiation. A 6.5-mm long KTP crystal, cut at (theta) equals 63 degree(s) and (phi) equals 0 degree(s), generates 12.5% conversion efficiency, and a 13-mm long crystal of the same cut converts 8% of the infrared pump into the visible. In the SHG experiment, a LiIO3 crystal is used, and the energy conversion to the red radiation is 9.5%. Maximum pump depletion is about 40% in both SFG and SHG experiments. Higher pump conversion is expected at higher pumping levels, and with a less lossy AgGaS2 crystal, a larger fraction of the depleted energy should be upconverted into useful visible light.