avoid deref missing func

This commit is contained in:
Paul Gauthier 2024-08-14 11:26:47 -07:00
parent 94a26019bd
commit 2eb1946909

View file

@ -1291,6 +1291,7 @@ class Coder:
show_func_err = None
show_content_err = None
try:
if completion.choices[0].message.tool_calls:
self.partial_response_function_call = (
completion.choices[0].message.tool_calls[0].function
)