Skip to content

Commit

Permalink
Token of second person replica added to agent conversation history.
Browse files Browse the repository at this point in the history
  • Loading branch information
atselousov committed Jan 31, 2019
1 parent fdcd1bb commit aa07a46
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ def to_tensor(string):
for i in range(batch_size):
pred_text_str, pred_text = self._postprocess_text(pred_texts[i], valid_observations[i]['agent'])

valid_observations[i]['agent'].history['dialog'].extend([self.vocab.talker2_bos_id] + pred_text)
valid_observations[i]['agent'].history['dialog'].extend([self.vocab.talker2_bos_id] +
pred_text +
[self.vocab.talker2_eos_id])
batch_reply[valid_ids[i]]['text'] = pred_text_str
batch_reply[valid_ids[i]]['episode_done'] = valid_observations[i]['agent'].episode_done

Expand Down

0 comments on commit aa07a46

Please sign in to comment.