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.
Thread ID
variable. If the variable is empty, it will create a new thread and automatically save the new thread ID in the variable.
Functions
section.
Name
, Email
If the Last Message
variable is set to “My name is John and my email is john@gmail.com”, then the Name
and Email
variables will be set to John
and john@gmail.com
respectively.
Create Chat Message
and Ask Assistant
blocks support vision. This means that zazubot automatically detects images URL in any user message provided to OpenAI and parse it. The URL needs to be isolated from the rest of the text message to be properly detected. Here is an example of a message with an image URL:
If the selected model is not compatible with vision, the image URL will be parsed as a plain text message.