from abc import ABC, abstractmethod

class Task(ABC):
    @abstractmethod
    def execute(self, entities):
        """
        Executes the task based on the provided entities.

        Args:
            entities (dict): A dictionary of entities extracted from the user input.

        Returns:
            str: A response message to be sent to the user.
        """
        pass

# Example Task
class GetWeatherTask(Task):
    def execute(self, entities):
        city = entities.get("city")
        if city:
            # Call weather API here
            weather_data = {"temperature": 25, "conditions": "sunny"} # Replace with actual API call
            return f"The weather in {city} is {weather_data['temperature']} degrees and {weather_data['conditions']}."
        else:
            return "Please specify a city."