bug fix chat history in ai
This commit is contained in:
parent
54fa5845af
commit
be40b2accd
@ -1,2 +1,2 @@
|
||||
__version__ = "3.3.0"
|
||||
__version__ = "3.3.1"
|
||||
|
||||
|
@ -598,9 +598,13 @@ class connapp:
|
||||
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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user