Skip to main content

execute_function_calls

Macro execute_function_calls 

Source
execute_function_calls!() { /* proc-macro */ }
Expand description

Macro to execute function calls requested by Gemini and update the session history.

§Usage

execute_function_calls!(session, function1, function2, ...)

§Returns

A Vec<Option<Result<serde_json::Value, String>>> containing the results of each function call. The length of the vector matches the number of functions provided.

  • Some(Ok(value)) if the function was called and succeeded.
  • Some(Err(err)) if the function was called but failed.
  • None if the function was not called.

§Note

The session is automatically updated with the FunctionResponse for successful calls.