Function call hangs when chatGPT tries to chain executing them

Hello all

I am running into an issue where function calls get stuck. This happens especially when the model realizes that it needs to execute another function. For example below ( i translated some of the domain specific technical language to plain english here )

{'content': "The network interface is up and running. The IP address assigned to it is 192.168.12.1/24. The interface is operating at full-duplex with a speed of 1000 Mb/s. There are no errors or discards on the interface.\n\nNext, let's check the neighbor ship configurations. I will execute the show run ospf command.", 'role': 'assistant', 'tool_calls': [{'id': 'call_UIAGCgJ3RRAWHE65nqq96o7t', 'function': {'arguments': '{\n "cmd": "show run ospf"\n}', 'name': 'show_cmd'}, 'type': 'function'}]}

the AI is smart enough to keep running the next function call, however, I get no response after this. and the function call is never executed.

My initial thought is that - is this happening because the response above didn’t get sent to openai API properly ?

Any idea/help is much appreciated !!!

never mind, i solved the issue. I forgot to implement a logic to keep checking if chatGPT is running chain function calls. This part should be inside a whileloop until it completes them. The response shoudl always have a tool_calls list implying the next function call