Skip to content

Class swarmauri_core.agent_factories.IExportConf.IExportConf

swarmauri_core.agent_factories.IExportConf.IExportConf

Bases: ABC

Interface for exporting configurations related to agent factories.

Implementing classes are expected to provide functionality for representing the factory's configuration as a dictionary, JSON string, or exporting to a file.

to_dict abstractmethod

to_dict()

Serializes the agent factory's configuration to a dictionary.

RETURNS DESCRIPTION
Dict[str, Any]

Dict[str, Any]: A dictionary representation of the factory's configuration.

Source code in swarmauri_core/agent_factories/IExportConf.py
13
14
15
16
17
18
19
20
21
@abstractmethod
def to_dict(self) -> Dict[str, Any]:
    """
    Serializes the agent factory's configuration to a dictionary.

    Returns:
        Dict[str, Any]: A dictionary representation of the factory's configuration.
    """
    pass

to_json abstractmethod

to_json()

Serializes the agent factory's configuration to a JSON string.

RETURNS DESCRIPTION
str

A JSON string representation of the factory's configuration.

TYPE: str

Source code in swarmauri_core/agent_factories/IExportConf.py
23
24
25
26
27
28
29
30
31
@abstractmethod
def to_json(self) -> str:
    """
    Serializes the agent factory's configuration to a JSON string.

    Returns:
        str: A JSON string representation of the factory's configuration.
    """
    pass

to_file abstractmethod

to_file(file_path)

Exports the agent factory's configuration to a file in a suitable format.

PARAMETER DESCRIPTION
file_path

The path to the file where the configuration should be saved.

TYPE: str

Source code in swarmauri_core/agent_factories/IExportConf.py
33
34
35
36
37
38
39
40
41
@abstractmethod
def to_file(self, file_path: str) -> None:
    """
    Exports the agent factory's configuration to a file in a suitable format.

    Parameters:
        file_path (str): The path to the file where the configuration should be saved.
    """
    pass