File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ public extension CallbackEvents {
4747
4848 struct AgentFunctionCallingToolReportProgress : CallbackEvent {
4949 public struct Info {
50- let functionName : String
51- let progress : String
50+ public let functionName : String
51+ public let progress : String
5252 }
5353
5454 public let info : Info
Original file line number Diff line number Diff line change @@ -158,8 +158,13 @@ extension AgentExecutor {
158158 }
159159 guard let tool = tools [ action. toolName] else { throw InvalidToolError ( ) }
160160 taskGroup. addTask {
161- let observation = try await tool. run ( input: action. toolInput)
162- return action. observationAvailable ( observation)
161+ do {
162+ let observation = try await tool. run ( input: action. toolInput)
163+ return action. observationAvailable ( observation)
164+ } catch {
165+ let observation = error. localizedDescription
166+ return action. observationAvailable ( observation)
167+ }
163168 }
164169 }
165170 var completedActions = [ AgentAction] ( )
You can’t perform that action at this time.
0 commit comments