MarketSquare / robotframework-ai

Apache License 2.0
10 stars 2 forks source link

Dynamic module discovery #21

Open StijnDeJong opened 3 weeks ago

StijnDeJong commented 3 weeks ago

In the initialization of the library, all modules are added manually. Instead it should be done automatically, so new module do not have to be added here every time. This can be done similarly to how it has been done in the AI_Interface and the RealTestDataGenerator. As every module inherits from Module, import all its subclasses and add them to the list of libraries indicated by the arrow.

    def __init__(self) -> None:
        """
        Initializes the RobotFrameworkAI library with necessary components like RealTestDataGenerator,
        Chatbot, and Assistant, which are integrated to provide AI capabilities to Robot Framework.
        """
        libraries = [RealTestDataGenerator(), Chatbot(), Assistant()]    <---
        DynamicCore.__init__(self, libraries)