callFunction method
Future<AppResponse<TriggerResponse<FunctionCallResponse> > >
callFunction({
- required FunctionCall functionCall,
Executes a specific tool/function call.
When the AI provides a FunctionCall (including arguments), this method performs the actual execution and returns the result via FunctionCallResponse.
Implementation
Future<AppResponse<TriggerResponse<FunctionCallResponse>>> callFunction({
required FunctionCall functionCall,
}) {
final payload = TriggerParse(
trigger: Trigger.callTool,
functionCall: functionCall,
);
return _sendTrigger<FunctionCallResponse>(
payload: payload,
fromJsonT: (json) => FunctionCallResponse.fromJson(json),
);
}