bug fix chat history in ai
This commit is contained in:
1 parent
b4b28110b1
commit
ef34961222
3 files changed
+15
-7
No files matched your search
@@ -2379,9 +2379,13 @@ Categorize the user's request based on the operation they want to perform on
|
||||
def _process_input(self, input, history):
|
||||
response = self.myai.ask(input , chat_history = history, dryrun = True)
|
||||
if not response["app_related"]:
|
||||
if not history:
|
||||
history = []
|
||||
history.extend(response["chat_history"])
|
||||
try:
|
||||
if not history:
|
||||
history = []
|
||||
history.extend(response["chat_history"])
|
||||
except:
|
||||
if not history:
|
||||
history = None
|
||||
return response["response"], history
|
||||
else:
|
||||
history = None
|
||||
|
||||
Reference in new issue
Block a user