autogen
autogen copied to clipboard
Initial work on ledger orchestrator.
@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.
@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.
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