We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da86fe2 commit acf5579Copy full SHA for acf5579
pythainlp/chat/core.py
@@ -87,7 +87,7 @@ def chat(self, text:str)->str:
87
if self.history!=[]:
88
for h,b in self.history:
89
_temp+=self.model.PROMPT_DICT['prompt_chatbot'].format_map({"human":h,"bot":b})+self.model.stop_token
90
- _temp+=self.model.PROMPT_DICT['prompt_chatbot'].format_map({"human":human,"bot":""})
+ _temp+=self.model.PROMPT_DICT['prompt_chatbot'].format_map({"human":text,"bot":""})
91
_bot = self.model.gen_instruct(_temp)
92
self.history.append((text,_bot))
93
return _bot
0 commit comments