|
@ -266,6 +266,8 @@ class AI(object): |
|
|
# output = llm_chain(inputs={"ai_name": self.bot.name, "persona": self.bot.persona, "scenario": self.bot.scenario, "human_name": chat_human_name, "ai_name_chat": self.bot.name, "chat_history": "", "input": message.content})['results'][0]['text'] |
|
|
# output = llm_chain(inputs={"ai_name": self.bot.name, "persona": self.bot.persona, "scenario": self.bot.scenario, "human_name": chat_human_name, "ai_name_chat": self.bot.name, "chat_history": "", "input": message.content})['results'][0]['text'] |
|
|
|
|
|
|
|
|
stop = ['<|endoftext|>', f"\n{chat_human_name}"] |
|
|
stop = ['<|endoftext|>', f"\n{chat_human_name}"] |
|
|
|
|
|
if chat_human_name != message.additional_kwargs['user_name']: |
|
|
|
|
|
stop.append(f"\n{message.additional_kwargs['user_name']}") |
|
|
#print(f"Message is: \"{message.content}\"") |
|
|
#print(f"Message is: \"{message.content}\"") |
|
|
await asyncio.sleep(0) |
|
|
await asyncio.sleep(0) |
|
|
output = await chain.arun({"input":message.content, "stop": stop}) |
|
|
output = await chain.arun({"input":message.content, "stop": stop}) |
|
|