forked from microsoft/autogen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Memory and Team an ABC (microsoft#5149)
* make memory and team an ABC * update memory test * update tests
- Loading branch information
1 parent
74f411e
commit 5e9b24c
Showing
3 changed files
with
23 additions
and
11 deletions.
There are no files selected for viewing
9 changes: 6 additions & 3 deletions
9
python/packages/autogen-agentchat/src/autogen_agentchat/base/_team.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
from typing import Any, Mapping, Protocol | ||
|
||
from typing import Any, Mapping | ||
from abc import ABC, abstractmethod | ||
from ._task import TaskRunner | ||
|
||
|
||
class Team(TaskRunner, Protocol): | ||
class Team(ABC, TaskRunner): | ||
@abstractmethod | ||
async def reset(self) -> None: | ||
"""Reset the team and all its participants to its initial state.""" | ||
... | ||
|
||
@abstractmethod | ||
async def save_state(self) -> Mapping[str, Any]: | ||
"""Save the current state of the team.""" | ||
... | ||
|
||
@abstractmethod | ||
async def load_state(self, state: Mapping[str, Any]) -> None: | ||
"""Load the state of the team.""" | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters