Source code for swarmauri.core.prompts.IPrompt

from abc import ABC, abstractmethod
from typing import Optional, Any

[docs] class IPrompt(ABC): """ A base abstract class representing a prompt system. Methods: __call__: Abstract method that subclasses must implement to enable the instance to be called directly. """
[docs] @abstractmethod def __call__(self, **kwargs) -> str: """ Abstract method that subclasses must implement to define the behavior of the prompt when called. """ pass