We present a fluid-particle model for a polymer solution in nonisothermal situations. The state of the fluid particles is characterized by the thermodynamic variables and a configuration tensor that describes the underlying molecular orientation of the polymer molecules. The specification of very simple physical mechanisms inspired by the dynamics of single polymer molecules allows one, with the help of the general equation for nonequilibrium reversible-irreversible coupling (GENERIC) formalism, to derive the equations of motion for a set of fluid particles carrying polymer molecules in suspension. In the simplest case of Hookean dumbbells we recover a fluid-particle version of the Oldroyd-B model in which thermal fluctuations are included consistently. Generalization to more complex viscoelastic models, such as finitely extensible nonlinear elastic Peterlin (FENE-P) model, with the proper introduction of thermal fluctuations is straightforward.