getWeather
that returns ‘Sunny and warm’ if you ask about the weather of Paris and ‘Rainy and cold’ if you ask for any other city 😂.
A more useful example would be, of course, to call an API to get the weather of the city the user is asking about.
return
keyword to return value to give back to OpenAI as the result of the function.
If you’d like to set variables directly in this code block, you can use the setVariable
function.
Functions
section.