def __init__(self, model_string: str,
                 system_prompt: str = "You are a helpful, creative, and smart assistant.",
                 is_multimodal: bool = False,
                 cache: Union[dc.Cache, bool] = False):

        """
        Base class for the engines.

        :param model_string: The model string to use.
        :type model_string: str
        :param system_prompt: The system prompt to use. Defaults to "You are a helpful, creative, and smart assistant."
        :type system_prompt: str
        :param is_multimodal: Whether the model is multimodal. Defaults to False.
        :type is_multimodal: bool
        :param cache: The cache to use. Defaults to True. Note that cache can also be a diskcache.Cache object.
        :type cache: Union[diskcache.Cache, bool]
        """

        root = platformdirs.user_cache_dir("textgrad")
        default_cache_path = os.path.join(root, f"cache_model_{model_string}.db")

        self.model_string = model_string
        self.system_prompt = system_prompt
        self.is_multimodal = is_multimodal

        # cache resolution
        if isinstance(cache, dc.Cache):
            self.cache = cache
        elif cache is True:
            self.cache = dc.Cache(default_cache_path)
        elif cache is False:
            self.cache = False
        else:
            raise ValueError("Cache argument must be a diskcache.Cache object or a boolean.")

        Base class for the engines.

        :param model_string: The model string to use.
        :type model_string: str
        :param system_prompt: The system prompt to use. Defaults to "You are a helpful, creative, and smart assistant."
        :type system_prompt: str
        :param is_multimodal: Whether the model is multimodal. Defaults to False.
        :type is_multimodal: bool
        :param cache: The cache to use. Defaults to True. Note that cache can also be a diskcache.Cache object.
        :type cache: Union[diskcache.Cache, bool]
        
textgrad/engine_experimental/base.py