(tool: ChatMessageTool)
| 486 | }); |
| 487 | }, |
| 488 | onAfterTool(tool: ChatMessageTool) { |
| 489 | botMessage?.tools?.forEach((t, i, tools) => { |
| 490 | if (tool.id == t.id) { |
| 491 | tools[i] = { ...tool }; |
| 492 | } |
| 493 | }); |
| 494 | get().updateTargetSession(session, (session) => { |
| 495 | session.messages = session.messages.concat(); |
| 496 | }); |
| 497 | }, |
| 498 | onError(error) { |
| 499 | const isAborted = error.message?.includes?.("aborted"); |
| 500 | botMessage.content += |