autogen icon indicating copy to clipboard operation
autogen copied to clipboard

Initial work on ledger orchestrator.

Open afourney opened this issue 1 year ago • 3 comments

afourney avatar Nov 13 '24 00:11 afourney

@ekzhu @jackgerrits No idea what to do with this pyright type error. Seems impossible to make a GroupChatManager that doesn't descend from BaseGroupChatManager

/home/afourney/repos/autogen/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_ledger_orchestrator/_ledger_orchestrator.py
  /home/afourney/repos/autogen/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_ledger_orchestrator/_ledger_orchestrator.py:25:38 - error: Argument of type "type[LedgerOrchestratorManager]" cannot be assigned to parameter "group_chat_manager_class" of type "type[BaseGroupChatManager]" in function "__init__"
    "type[LedgerOrchestratorManager]" is not assignable to "type[BaseGroupChatManager]"
    Type "type[LedgerOrchestratorManager]" is not assignable to type "type[BaseGroupChatManager]" (reportArgumentType)
  /home/afourney/repos/autogen/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_ledger_orchestrator/_ledger_orchestrator.py:33:9 - error: Method "_create_group_chat_manager_factory" overrides class "BaseGroupChat" in an incompatible manner
    Return type mismatch: base method returns type "() -> BaseGroupChatManager", override returns type "() -> LedgerOrchestratorManager"
      Type "() -> LedgerOrchestratorManager" is not assignable to type "() -> BaseGroupChatManager"
        Function return type "LedgerOrchestratorManager" is incompatible with type "BaseGroupChatManager"
          "LedgerOrchestratorManager" is not assignable to "BaseGroupChatManager" (reportIncompatibleMethodOverride)

RESOLVED.

afourney avatar Nov 13 '24 07:11 afourney

@ekzhu @jackgerrits No idea what to do with this pyright type error. Seems impossible to make a GroupChatManager that doesn't descend from BaseGroupChatManager

/home/afourney/repos/autogen/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_ledger_orchestrator/_ledger_orchestrator.py
  /home/afourney/repos/autogen/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_ledger_orchestrator/_ledger_orchestrator.py:25:38 - error: Argument of type "type[LedgerOrchestratorManager]" cannot be assigned to parameter "group_chat_manager_class" of type "type[BaseGroupChatManager]" in function "__init__"
    "type[LedgerOrchestratorManager]" is not assignable to "type[BaseGroupChatManager]"
    Type "type[LedgerOrchestratorManager]" is not assignable to type "type[BaseGroupChatManager]" (reportArgumentType)
  /home/afourney/repos/autogen/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_ledger_orchestrator/_ledger_orchestrator.py:33:9 - error: Method "_create_group_chat_manager_factory" overrides class "BaseGroupChat" in an incompatible manner
    Return type mismatch: base method returns type "() -> BaseGroupChatManager", override returns type "() -> LedgerOrchestratorManager"
      Type "() -> LedgerOrchestratorManager" is not assignable to type "() -> BaseGroupChatManager"
        Function return type "LedgerOrchestratorManager" is incompatible with type "BaseGroupChatManager"
          "LedgerOrchestratorManager" is not assignable to "BaseGroupChatManager" (reportIncompatibleMethodOverride)

I will put in a new PR to fix this.

ekzhu avatar Nov 13 '24 20:11 ekzhu

Looks good overall. I think exposing the n_rounds and n_stalls might be useful.

Ooops. Yeah, I forgot to wire that back up to the Team

afourney avatar Nov 13 '24 21:11 afourney