Thermodynamic formalism, the theory of equilibrium states, is prevalent in both dynamical systems and probability theory. Various closely related notions have been developed: e.g. Gibbs and g-measures, chains of complete connections and variable length Markov chains. In particular it is interesting to understand the exact relation between Gibbs and g-measures in a one dimensional context. Often g-measures are also Gibbs, but recently an example to the contrary has been presented. In my talk I will discuss the relation between Gibbs and g-measures and try to describe the border between these two popular classes of probabilistic models. The content of this talk is based on joint work with R. Fernandez and R. Verbitskiy.