bugfix in showing text

This commit is contained in:
Saifeddine ALOUI 2023-04-09 21:43:42 +02:00
parent c47fb87267
commit cf768e9201

29
app.py
View File

@ -100,21 +100,22 @@ Start by welcoming the user then stop sending text.
GPT4All:Welcome! I'm here to assist you with anything you need. What can I do for you today?""" GPT4All:Welcome! I'm here to assist you with anything you need. What can I do for you today?"""
): ):
self.full_message += conditionning_message +"\n" self.full_message += conditionning_message +"\n"
self.prepare_query(conditionning_message)
self.chatbot_bindings.generate(
conditionning_message,
new_text_callback=self.new_text_callback,
n_predict=len(conditionning_message), # self.prepare_query(conditionning_message)
temp=self.args.temp, # self.chatbot_bindings.generate(
top_k=self.args.top_k, # conditionning_message,
top_p=self.args.top_p, # new_text_callback=self.new_text_callback,
repeat_penalty=self.args.repeat_penalty,
repeat_last_n = self.args.repeat_last_n, # n_predict=len(conditionning_message),
seed=self.args.seed, # temp=self.args.temp,
n_threads=8 # top_k=self.args.top_k,
) # top_p=self.args.top_p,
print(f"Bot said:{self.bot_says}") # repeat_penalty=self.args.repeat_penalty,
# repeat_last_n = self.args.repeat_last_n,
# seed=self.args.seed,
# n_threads=8
# )
# print(f"Bot said:{self.bot_says}")
def prepare_query(self, message): def prepare_query(self, message):