The sentence-level encoder GRU iteratively takes the embeddings of the words in a sentence to update its hidden state, thus its final hidden state is a representation of the sentence.
the decoder GRU takes the current dialogue representation to initialize its hidden state so as to generate a response sentence word by word.