@@ -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" ,
@@ -118,7 +127,7 @@ def __init__(self,
118
127
currentAgent : ToolReference = None ,
119
128
displayText : str = "" ,
120
129
inputContext : list [InputContext ] = None ,
121
- toolCategory : str = "" ,
130
+ toolCategory : ToolCategory = ToolCategory . NoCategory ,
122
131
toolName : str = "" ,
123
132
parentID : str = "" ,
124
133
type : RunEventType = RunEventType .event ,
@@ -148,6 +157,8 @@ def __init__(self,
148
157
if isinstance (self .inputContext [i ], dict ):
149
158
self .inputContext [i ] = InputContext (** self .inputContext [i ])
150
159
self .toolCategory = toolCategory
160
+ if isinstance (self .toolCategory , str ):
161
+ self .toolCategory = ToolCategory [self .toolCategory ]
151
162
self .toolName = toolName
152
163
self .parentID = parentID
153
164
self .type = type
0 commit comments