GO:0033754:   indoleamine 2,3-dioxygenase activity
Catalysis of the reaction: tryptophan + O2 = N-formylkynurenine. The product of the reaction depends on the substrate; D-tryptophan produces N-formyl-D-kynurenine, and L-tryptophan produces N-formyl-L-kynurenine.