More recent ChatGPT models can return more than one tool_call in a chat completion. Our code assumed only one tool_call, which was the case originally, but no longer! This PR addresses that, while also adding tests and cleaning up some code redundancy.
Description
More recent ChatGPT models can return more than one tool_call in a chat completion. Our code assumed only one tool_call, which was the case originally, but no longer! This PR addresses that, while also adding tests and cleaning up some code redundancy.
Resolves #764
Checklist
Have you done the following?