Function Call Request
Request to call a function by sending a Function Call Request message.
What is The FunctionCallRequest
Message
FunctionCallRequest
MessageThe FunctionCallRequest
message is used to call a function from the server.
Receiving FunctionCallRequest
FunctionCallRequest
If a function is client-side and no URL is provided for that function in the Settings Configuration then the server will request to call the function by sending the client a FunctionCallRequest
message. Upon receiving this message, the client should perform the requested function call and reply with a Function Call Response containing the function's output.
{
"type": "FunctionCallRequest",
"function_name": "", // The `name` you gave in the function definition
"function_call_id": "", // ID to be passed back in the `FunctionCallResponse`
"input": {...} // A JSON value containing the `parameters` you defined for this function
}
Conclusion
When a function is client-side and no URL is provided in the Settings Configuration, the server will trigger the function call by sending a FunctionCallRequest
message. The client is then responsible for executing the function and responding with a Function Call Response containing the function's result.
Updated about 12 hours ago