Some background, since most readers would probably need it.
A thermoplastic is a polymer that becomes pliable/moldable upon heating, and then returns to a solid (keeping its new shape) when cooled. Thermoplastics are generally high molecular weight polymers with very few or no crosslinks. Polymer chains are held together by intermolecular forces (most often van der waals) and physical entanglement, both of which can be overcome with addition of heat.
A thermoset is a polymer that is irreversibly cured, usually through covalent crosslinking (during or after polymerization). The covalent crosslinks hold the chains together in such a way that the chains cannot be separated by the addition of (small amounts of) kinetic energy. Thermosets tend to dramatically fail after the addition of lots of heat, following which they do not return to their original state. It is possible for the cumulative forces from many strong non-covalent interactions (ionic, hydrogen-bonding, and even pi stacking) to make a polymer behave like a thermoset. For example, proteins are thermosets.
Can you tell if a monomer will produce a thermoplastic or themoset based on its structure?
Yes. All polymers produced from only mono- (addition polymerizations) or bi- (condensation polymerizations) functional monomers will always produce thermoplastics. All of the hydroxybutanoic acids (e.g. $\gamma$-hydroxybutanoic acid) are difunctional monomers for condensation polymerizations. Their polymers will be thermoplastics.
The addition of tri- or tetra- functional monomers produces crosslinks, which always produces thermosets. For example, glycerol, malic acid, or lysine could be trifunctional monomers in condensation polymerizations. 2-Amino-3-hydroxybutanoic acid (threonine) is a trifunctional monomer. It has three functional groups (alcohol, amine, carboxylic acid), that can all react in a condensation polymerization. Any synthetic polymer containing threonine is likely to contain crosslinks and be a thermoset.
Many thermoplastic polymers can be converted into thermosets by curing them afterwards. Some curing is thermal, some is irradiative (espccially using UV), and some is chemical. A prime example is polyisoprene (natural latex rubber), which is a thermoplastic (with a very low melting point). It is also an elastomer - it will stretch and return to its original shape (although melting it erases the "memory"). Rubber is converted into a thermoset by vulcanization to make it more useful while still having the elastomeric properties.