if self.cnt == 0:
// add the persona on to the first message to model agent
act.force_set("text", self.p2 + act.get("text", "hi"))
model_agent.observe(validate(act))
else:
model_agent.observe(validate(act))
acts[1] = model_agent.act()
human_agent.observe(validate(acts[1]))
After Change
a2_persona.append(t)
personas.add("\n".join(a1_persona))
personas.add("\n".join(a2_persona))
print("[ loaded " + str(len(personas)) + " personas ]")
return list(personas)
class InteractiveWorld(InteractiveBaseWorld):
@staticmethod
def add_cmdline_args(argparser):
parser = argparser.add_argument_group("ConvAI2 Interactive World")
parser.add_argument(
"--display-partner-persona",
type="bool",
default=True,
help="Display your partner persona at the end of the chat",
)
def __init__(self, opt, agents, shared=None):