bug fixes
This commit is contained in:
parent
fc85314e9b
commit
d5ca894d55
@ -1,2 +1,2 @@
|
|||||||
__version__ = "3.2.4"
|
__version__ = "3.2.5"
|
||||||
|
|
||||||
|
13
connpy/ai.py
13
connpy/ai.py
@ -364,14 +364,14 @@ class ai:
|
|||||||
|
|
||||||
'''
|
'''
|
||||||
output = {}
|
output = {}
|
||||||
|
output["dryrun"] = dryrun
|
||||||
|
output["input"] = user_input
|
||||||
original = self._retry_function(self._get_filter, max_retries, backoff_num, user_input, chat_history)
|
original = self._retry_function(self._get_filter, max_retries, backoff_num, user_input, chat_history)
|
||||||
if not original:
|
if not original:
|
||||||
output["app_related"] = False
|
output["app_related"] = False
|
||||||
output["response"] = f"{self.model} api is not responding right now, please try again later."
|
output["response"] = f"{self.model} api is not responding right now, please try again later."
|
||||||
return output
|
return output
|
||||||
output["input"] = user_input
|
|
||||||
output["app_related"] = original["response"]["app_related"]
|
output["app_related"] = original["response"]["app_related"]
|
||||||
output["dryrun"] = dryrun
|
|
||||||
output["chat_history"] = original["chat_history"]
|
output["chat_history"] = original["chat_history"]
|
||||||
if not output["app_related"]:
|
if not output["app_related"]:
|
||||||
output["response"] = original["response"]["response"]
|
output["response"] = original["response"]["response"]
|
||||||
@ -390,9 +390,14 @@ class ai:
|
|||||||
if not type == "command":
|
if not type == "command":
|
||||||
output["action"] = "list_nodes"
|
output["action"] = "list_nodes"
|
||||||
else:
|
else:
|
||||||
commands = self._retry_function(self._get_commands, max_retries, backoff_num, user_input, thisnodes)
|
if thisnodes:
|
||||||
|
commands = self._retry_function(self._get_commands, max_retries, backoff_num, user_input, thisnodes)
|
||||||
|
else:
|
||||||
|
output["app_related"] = False
|
||||||
|
filterlist = ", ".join(output["filter"])
|
||||||
|
output["response"] = f"I'm sorry, I coudn't find any device with filter{'s' if len(output['filter']) != 1 else ''}: {filterlist}."
|
||||||
|
return output
|
||||||
if not commands:
|
if not commands:
|
||||||
output = []
|
|
||||||
output["app_related"] = False
|
output["app_related"] = False
|
||||||
output["response"] = f"{self.model} api is not responding right now, please try again later."
|
output["response"] = f"{self.model} api is not responding right now, please try again later."
|
||||||
return output
|
return output
|
||||||
|
@ -931,14 +931,14 @@ __pdoc__ = {
|
|||||||
|
|
||||||
'''
|
'''
|
||||||
output = {}
|
output = {}
|
||||||
|
output["dryrun"] = dryrun
|
||||||
|
output["input"] = user_input
|
||||||
original = self._retry_function(self._get_filter, max_retries, backoff_num, user_input, chat_history)
|
original = self._retry_function(self._get_filter, max_retries, backoff_num, user_input, chat_history)
|
||||||
if not original:
|
if not original:
|
||||||
output["app_related"] = False
|
output["app_related"] = False
|
||||||
output["response"] = f"{self.model} api is not responding right now, please try again later."
|
output["response"] = f"{self.model} api is not responding right now, please try again later."
|
||||||
return output
|
return output
|
||||||
output["input"] = user_input
|
|
||||||
output["app_related"] = original["response"]["app_related"]
|
output["app_related"] = original["response"]["app_related"]
|
||||||
output["dryrun"] = dryrun
|
|
||||||
output["chat_history"] = original["chat_history"]
|
output["chat_history"] = original["chat_history"]
|
||||||
if not output["app_related"]:
|
if not output["app_related"]:
|
||||||
output["response"] = original["response"]["response"]
|
output["response"] = original["response"]["response"]
|
||||||
@ -957,9 +957,14 @@ __pdoc__ = {
|
|||||||
if not type == "command":
|
if not type == "command":
|
||||||
output["action"] = "list_nodes"
|
output["action"] = "list_nodes"
|
||||||
else:
|
else:
|
||||||
commands = self._retry_function(self._get_commands, max_retries, backoff_num, user_input, thisnodes)
|
if thisnodes:
|
||||||
|
commands = self._retry_function(self._get_commands, max_retries, backoff_num, user_input, thisnodes)
|
||||||
|
else:
|
||||||
|
output["app_related"] = False
|
||||||
|
filterlist = ", ".join(output["filter"])
|
||||||
|
output["response"] = f"I'm sorry, I coudn't find any device with filter{'s' if len(output['filter']) != 1 else ''}: {filterlist}."
|
||||||
|
return output
|
||||||
if not commands:
|
if not commands:
|
||||||
output = []
|
|
||||||
output["app_related"] = False
|
output["app_related"] = False
|
||||||
output["response"] = f"{self.model} api is not responding right now, please try again later."
|
output["response"] = f"{self.model} api is not responding right now, please try again later."
|
||||||
return output
|
return output
|
||||||
@ -1090,14 +1095,14 @@ __pdoc__ = {
|
|||||||
|
|
||||||
'''
|
'''
|
||||||
output = {}
|
output = {}
|
||||||
|
output["dryrun"] = dryrun
|
||||||
|
output["input"] = user_input
|
||||||
original = self._retry_function(self._get_filter, max_retries, backoff_num, user_input, chat_history)
|
original = self._retry_function(self._get_filter, max_retries, backoff_num, user_input, chat_history)
|
||||||
if not original:
|
if not original:
|
||||||
output["app_related"] = False
|
output["app_related"] = False
|
||||||
output["response"] = f"{self.model} api is not responding right now, please try again later."
|
output["response"] = f"{self.model} api is not responding right now, please try again later."
|
||||||
return output
|
return output
|
||||||
output["input"] = user_input
|
|
||||||
output["app_related"] = original["response"]["app_related"]
|
output["app_related"] = original["response"]["app_related"]
|
||||||
output["dryrun"] = dryrun
|
|
||||||
output["chat_history"] = original["chat_history"]
|
output["chat_history"] = original["chat_history"]
|
||||||
if not output["app_related"]:
|
if not output["app_related"]:
|
||||||
output["response"] = original["response"]["response"]
|
output["response"] = original["response"]["response"]
|
||||||
@ -1116,9 +1121,14 @@ __pdoc__ = {
|
|||||||
if not type == "command":
|
if not type == "command":
|
||||||
output["action"] = "list_nodes"
|
output["action"] = "list_nodes"
|
||||||
else:
|
else:
|
||||||
commands = self._retry_function(self._get_commands, max_retries, backoff_num, user_input, thisnodes)
|
if thisnodes:
|
||||||
|
commands = self._retry_function(self._get_commands, max_retries, backoff_num, user_input, thisnodes)
|
||||||
|
else:
|
||||||
|
output["app_related"] = False
|
||||||
|
filterlist = ", ".join(output["filter"])
|
||||||
|
output["response"] = f"I'm sorry, I coudn't find any device with filter{'s' if len(output['filter']) != 1 else ''}: {filterlist}."
|
||||||
|
return output
|
||||||
if not commands:
|
if not commands:
|
||||||
output = []
|
|
||||||
output["app_related"] = False
|
output["app_related"] = False
|
||||||
output["response"] = f"{self.model} api is not responding right now, please try again later."
|
output["response"] = f"{self.model} api is not responding right now, please try again later."
|
||||||
return output
|
return output
|
||||||
|
Loading…
Reference in New Issue
Block a user