The function calling documentation is impossible to understand

I used to have this code running:

for chunk in ai_kitchen:
                print('for loop started')

                if 'function_call' in chunk.choices[0]['delta']:

                    function_args_chunk = chunk.choices[0]['delta']['function_call']['arguments']

                    if chunk.choices[0]['delta']['function_call'].get('name'):
                        print('Function message found')
                        function_name_chunk = chunk.choices[0]['delta']['function_call'].get('name')
                        print(function_name_chunk)
                        function_name += f'{function_name_chunk}'
                        print(function_name)

                    # add the function to the recipe_function_call string
                    function_args += f'{function_args_chunk}'

                elif 'delta' in chunk.choices[0] and 'content' in chunk.choices[0]['delta']:
                    print('Normal message found')
                    message_content = chunk.choices[0]['delta']['content']
                    print(message_content)
                    result = {'message': message_content}
                    self.send(text_data=json.dumps(result))
                else:
                    print(chunk)```

But now it is impossible for me to figure out how to access the right places in the response when calling to functions. Can someone please point me to the place in the documentation, that handles the responses from the function call?

Thank you. Getting really frustrated.