The classical Peter—Weyl theorem describes the structure of the space of functions on a semi-simple algebraic group. On the level of characters (in type A) this boils down to the Cauchy identity for the products of Schur polynomials. We formulate and prove an analogue of the Peter—Weyl theorem for current groups. In particular, in type A the corresponding characters identity is governed by the Cauchy identity for the products of q-Whittaker functions. We also formulate and prove a version of the Schur—Weyl theorem for current groups, which can be seen as a specialization of a theorem due to Drinfeld and Chari—Pressley. The link between the Peter—Weyl and Schur—Weyl theorems is provided by the (current version of) Howe duality.