As a user of this go SDK it was not immediately intuitive to me how to correctly utilize the function calling capability of GPT4 (https://platform.openai.com/docs/guides/function-calling). While the aformentioned link provides a helpful example written in python, I initially tripped over how to correclty translate the specification of function arguments when usingthis go SDK. To make it easier for others in the future this commit adds a completion-with-tool example showing how to correctly utilize the function calling capability of GPT4 using this SDK end-to-end in a CreateChatCompletion() sequence.
To run an example:
export OPENAI_API_KEY="<your key here>"
go run ./example/<target>