from abc import ABC, abstractmethod
from typing import List, Any, Dict
from swarmauri.core.chains.IChain import IChain
from swarmauri.core.chains.IChainStep import IChainStep
[docs]
class IChainFactory(ABC):
"""
Interface for creating and managing execution chains within the system.
"""
[docs]
@abstractmethod
def create_chain(self, steps: List[IChainStep] = None) -> IChain:
pass
[docs]
@abstractmethod
def get_chain(self) -> IChain:
pass
[docs]
@abstractmethod
def set_chain(self, chain: IChain):
pass
[docs]
@abstractmethod
def reset_chain(self):
pass
[docs]
@abstractmethod
def get_chain_steps(self) -> List[IChainStep]:
pass
[docs]
@abstractmethod
def set_chain_steps(self, steps: List[IChainStep]):
pass
[docs]
@abstractmethod
def add_chain_step(self, step: IChainStep):
pass
[docs]
@abstractmethod
def remove_chain_step(self, key: str):
pass
[docs]
@abstractmethod
def get_configs(self) -> Dict[str, Any]:
pass
[docs]
@abstractmethod
def set_configs(self, **configs):
pass
[docs]
@abstractmethod
def get_config(self, key: str) -> Any:
pass
[docs]
@abstractmethod
def set_config(self, key: str, value: Any):
pass