Skip to main content

question()

Last updated 24/09/2024

The

question()
is a function on the
Five
object that is sent via the Five server to get a result back from the OpenAI platform. After the OpenAI has completed its answer to the question, the onResultsCallBack will be called with the provided answer.

Refer to the chapter Setup OpenAI to know how to save your OpenAI Key in Five.

Available

Client

Function Signature
question(question: string, onResultsCallBack: (reply: string) => void) : string

ParameterTypeDescription
question
stringThe question to ask
onResultsCallBack
functionFunction that returns the reply to the question

Examples

question()