Raise ValueError if gpt makes an unknown function_call

This commit is contained in:
Paul Gauthier 2023-06-24 08:32:12 -07:00
parent 4eee71b956
commit a1909611d9
2 changed files with 10 additions and 2 deletions

View file

@ -392,7 +392,10 @@ class Coder:
if self.partial_response_function_call:
args = self.parse_partial_args()
content = args["explanation"]
if args:
content = args["explanation"]
else:
content = ""
elif self.partial_response_content:
content = self.partial_response_content
else:
@ -535,6 +538,8 @@ class Coder:
return interrupted
def show_send_output(self, completion, silent):
# dump(completion)
show_func_err = None
show_content_err = None
try: