Skip to content

Delegate orchestrator instantiation #87

@felipemontoya

Description

@felipemontoya

There is more than one place in the code where we do:

from openedx_ai_extensions.workflows import orchestrators  # pylint: disable=import-outside-toplevel

orchestrator_name = self.profile.orchestrator_class  # "DirectLLMResponse"
orchestrator_class = getattr(orchestrators, orchestrator_name)
orchestrator = orchestrator_class(workflow=self, user=user, context=running_context)

We should refactor that into a class method of the orchestrator and delegate every instance of this to the new method. This way there is no risk that we have different instantiations of orchestrators in the codebase

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions