We study the time evolution of the quantum field inside a cavity coupled to a beam of two-level atoms of temperature T, given that each atom, after having crossed the cavity, interacts with a classical field and finally with a detector measuring its state. It is found that, if the coupling between the atoms and the quantum field is weak and is not too small, for any given realization of the measurements, an arbitrary initial state of the field localizes after some time into squeezed states. The centre α of the squeezed state moves randomly in time in the complex plane, but the squeezing amplitude r and phase ϕ show very small fluctuations. Their mean values and are independent of the random results of the measurements, of the initial state and of the atom–field coupling constant λ. The time evolution of r and ϕ is determined analytically by deriving and solving the quantum state diffusion equation describing the field dynamics in the limit of small λ, keeping finite. It is shown that increases with T, i.e., the squeezing is enhanced by increasing the temperature of the atomic beam.