Skip to main content

OpenAI's functions

Link to the doc: https://platform.openai.com/docs/guides/function-calling

These are arguments we can give to openAI's ChatCompletion create function. It is like giving extra tools to the model so it can perform external actions.

The examples given by the doc are get_current_weather to tell the model that he can asks to get the weather.

Another use case would be to force a return format, by creating a fake function that would take as argument the data in the format we want.