@@ -18,6 +18,15 @@ class RunEventType(Enum):
18
18
prompt = "prompt"
19
19
20
20
21
+ class ToolCategory (Enum ):
22
+ ProviderToolCategory = "provider" ,
23
+ CredentialToolCategory = "credential" ,
24
+ ContextToolCategory = "context" ,
25
+ InputToolCategory = "input" ,
26
+ OutputToolCategory = "output" ,
27
+ NoCategory = ""
28
+
29
+
21
30
class RunState (Enum ):
22
31
Creating = "creating" ,
23
32
Running = "running" ,
@@ -117,7 +126,7 @@ def __init__(self,
117
126
agentGroup : list [ToolReference ] = None ,
118
127
displayText : str = "" ,
119
128
inputContext : list [InputContext ] = None ,
120
- toolCategory : str = "" ,
129
+ toolCategory : ToolCategory = "" ,
121
130
toolName : str = "" ,
122
131
parentID : str = "" ,
123
132
type : RunEventType = RunEventType .event ,
@@ -144,6 +153,8 @@ def __init__(self,
144
153
if isinstance (self .inputContext [i ], dict ):
145
154
self .inputContext [i ] = InputContext (** self .inputContext [i ])
146
155
self .toolCategory = toolCategory
156
+ if isinstance (self .toolCategory , str ):
157
+ self .toolCategory = ToolCategory [self .toolCategory ]
147
158
self .toolName = toolName
148
159
self .parentID = parentID
149
160
self .type = type
0 commit comments