#[gemini_function]Expand description
Attribute macro to mark a function as callable by Gemini.
This macro generates a schema for the function and an execute method to call it
with JSON arguments.
§Requirements
- Function arguments must be owned types that implement
GeminiSchema(e.g.,String,i32,bool). - References are not supported.
- The function can be
asyncand can return aResult(theOkvalue must implementSerialize).
§Example
ⓘ
#[gemini_function]
/// Returns the current weather for a location.
fn get_weather(location: String) -> String {
format!("The weather in {} is sunny.", location)
}