1
+ from typing import Any
2
+
3
+
1
4
class AgentNameConflict (Exception ):
2
- def __init__ (self , msg = "Found multiple agents with the same name." , * args , ** kwargs ):
5
+ def __init__ (self , msg : str = "Found multiple agents with the same name." , * args : Any , ** kwargs : Any ):
3
6
super ().__init__ (msg , * args , ** kwargs )
4
7
5
8
6
9
class NoEligibleSpeaker (Exception ):
7
10
"""Exception raised for early termination of a GroupChat."""
8
11
9
- def __init__ (self , message = "No eligible speakers." ):
12
+ def __init__ (self , message : str = "No eligible speakers." ):
10
13
self .message = message
11
14
super ().__init__ (self .message )
12
15
13
16
14
17
class SenderRequired (Exception ):
15
18
"""Exception raised when the sender is required but not provided."""
16
19
17
- def __init__ (self , message = "Sender is required but not provided." ):
20
+ def __init__ (self , message : str = "Sender is required but not provided." ):
18
21
self .message = message
19
22
super ().__init__ (self .message )
20
23
@@ -23,7 +26,7 @@ class InvalidCarryOverType(Exception):
23
26
"""Exception raised when the carryover type is invalid."""
24
27
25
28
def __init__ (
26
- self , message = "Carryover should be a string or a list of strings. Not adding carryover to the message."
29
+ self , message : str = "Carryover should be a string or a list of strings. Not adding carryover to the message."
27
30
):
28
31
self .message = message
29
32
super ().__init__ (self .message )
@@ -32,6 +35,6 @@ def __init__(
32
35
class UndefinedNextAgent (Exception ):
33
36
"""Exception raised when the provided next agents list does not overlap with agents in the group."""
34
37
35
- def __init__ (self , message = "The provided agents list does not overlap with agents in the group." ):
38
+ def __init__ (self , message : str = "The provided agents list does not overlap with agents in the group." ):
36
39
self .message = message
37
40
super ().__init__ (self .message )
0 commit comments