{"text": "Hello there.",
"labels": ["General Kenobi."]},
]
obs_labs = [agent.vectorize(o) for o in obs_labs]
reply = agent.batch_act(obs_labs)
for i in range(len(obs_labs)):
self.assertEqual(reply[i]["text"], f"Training {i}!")
After Change
obs_labs_vecs = []
for o in obs_labs:
agent.history.clear()
agent.history.update_history(o)
obs_labs_vecs.append(agent.vectorize(o, agent.history))
reply = agent.batch_act(obs_labs_vecs)
for i in range(len(obs_labs_vecs)):
self.assertEqual(reply[i]["text"], f"Training {i}!")