How to make function calling return array as long as I want?

Here’s the basics documentation of functions:

https://platform.openai.com/docs/guides/function-calling

Since they don’t explicitly demonstrate how to pass the assistant function call and the function return back when using functions, I wrote that up:

Then if you were to use tools instead of functions to make use of functions, the specification and the handling is different. I also show how to do the assistant + return response, in code: