Skip to content

Class swarmauri_core.swarm_apis.ISwarmAPI.ISwarmAPI

swarmauri_core.swarm_apis.ISwarmAPI.ISwarmAPI

Bases: ABC

Interface for managing the swarm's API endpoints.

dispatch_request abstractmethod

dispatch_request(request_data)

Dispatches an incoming user request to one or more suitable agents based on their capabilities.

Parameters: - request_data (Dict[str, Any]): Data related to the incoming request.

Returns: - Any: Response from processing the request.

Source code in swarmauri_core/swarm_apis/ISwarmAPI.py
10
11
12
13
14
15
16
17
18
19
20
21
@abstractmethod
def dispatch_request(self, request_data: Dict[str, Any]) -> Any:
    """
    Dispatches an incoming user request to one or more suitable agents based on their capabilities.

    Parameters:
    - request_data (Dict[str, Any]): Data related to the incoming request.

    Returns:
    - Any: Response from processing the request.
    """
    pass

broadcast_request abstractmethod

broadcast_request(request_data)
Source code in swarmauri_core/swarm_apis/ISwarmAPI.py
23
24
25
@abstractmethod
def broadcast_request(self, request_data: Dict[str, Any]) -> Any:
    pass