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.
General Enhancements in agentchat 2.0 (microsoft#1906)
* work in progress * wip * groupchat type hints * clean up * formatting * formatting * clean up * address comments * better comment * updates docstring a_send * resolve comments * agent.py back to original format * resolve more comments * rename carryover type exception * revert next_agent changes + keeping UndefinedNextagent * fixed ciruclar dependencies? * fix cache tests --------- Co-authored-by: Eric Zhu <[email protected]> Co-authored-by: Chi Wang <[email protected]>
- Loading branch information
1 parent
b1e00f0
commit 139618b
Showing
9 changed files
with
201 additions
and
144 deletions.
There are no files selected for viewing
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
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
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,3 +1,37 @@ | ||
class AgentNameConflict(Exception): | ||
def __init__(self, msg="Found multiple agents with the same name.", *args, **kwargs): | ||
super().__init__(msg, *args, **kwargs) | ||
|
||
|
||
class NoEligibleSpeaker(Exception): | ||
"""Exception raised for early termination of a GroupChat.""" | ||
|
||
def __init__(self, message="No eligible speakers."): | ||
self.message = message | ||
super().__init__(self.message) | ||
|
||
|
||
class SenderRequired(Exception): | ||
"""Exception raised when the sender is required but not provided.""" | ||
|
||
def __init__(self, message="Sender is required but not provided."): | ||
self.message = message | ||
super().__init__(self.message) | ||
|
||
|
||
class InvalidCarryOverType(Exception): | ||
"""Exception raised when the carryover type is invalid.""" | ||
|
||
def __init__( | ||
self, message="Carryover should be a string or a list of strings. Not adding carryover to the message." | ||
): | ||
self.message = message | ||
super().__init__(self.message) | ||
|
||
|
||
class UndefinedNextAgent(Exception): | ||
"""Exception raised when the provided next agents list does not overlap with agents in the group.""" | ||
|
||
def __init__(self, message="The provided agents list does not overlap with agents in the group."): | ||
self.message = message | ||
super().__init__(self.message) |
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
Oops, something went wrong.