pub trait CustomToolExecutor: Send + Sync {
// Required method
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: JsonValue,
execute_request: Option<&'life1 dyn ExecuteRequestFn>,
auth_credentials: Option<&'life2 HashMap<String, JsonValue>>,
) -> Pin<Box<dyn Future<Output = Result<JsonValue, ComposioError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Executor for custom tools
This trait abstracts over different types of custom tool executors:
- Simple executors (no authentication)
- Authenticated executors (with proxy and credentials)
Required Methods§
Sourcefn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: JsonValue,
execute_request: Option<&'life1 dyn ExecuteRequestFn>,
auth_credentials: Option<&'life2 HashMap<String, JsonValue>>,
) -> Pin<Box<dyn Future<Output = Result<JsonValue, ComposioError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: JsonValue,
execute_request: Option<&'life1 dyn ExecuteRequestFn>,
auth_credentials: Option<&'life2 HashMap<String, JsonValue>>,
) -> Pin<Box<dyn Future<Output = Result<JsonValue, ComposioError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the custom tool
§Arguments
request- Input arguments as JSONexecute_request- Optional proxy executor for authenticated callsauth_credentials- Optional authentication credentials