File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,15 @@ class RunEventType(Enum):
1818 prompt = "prompt"
1919
2020
21+ class ToolCategory (Enum ):
22+ provider = "provider" ,
23+ credential = "credential" ,
24+ context = "context" ,
25+ input = "input" ,
26+ output = "output" ,
27+ none = ""
28+
29+
2130class RunState (Enum ):
2231 Creating = "creating" ,
2332 Running = "running" ,
@@ -118,7 +127,7 @@ def __init__(self,
118127 currentAgent : ToolReference = None ,
119128 displayText : str = "" ,
120129 inputContext : list [InputContext ] = None ,
121- toolCategory : str = "" ,
130+ toolCategory : ToolCategory = ToolCategory . none ,
122131 toolName : str = "" ,
123132 parentID : str = "" ,
124133 type : RunEventType = RunEventType .event ,
@@ -148,6 +157,8 @@ def __init__(self,
148157 if isinstance (self .inputContext [i ], dict ):
149158 self .inputContext [i ] = InputContext (** self .inputContext [i ])
150159 self .toolCategory = toolCategory
160+ if isinstance (self .toolCategory , str ):
161+ self .toolCategory = ToolCategory .none if self .toolCategory == "" else ToolCategory [self .toolCategory ]
151162 self .toolName = toolName
152163 self .parentID = parentID
153164 self .type = type
You can’t perform that action at this time.
0 commit comments