public interface LLMToolCallObserver:
Observes tool calls performed by an LLMChatSession.
An observer is useful for user interfaces that need to display tool activity while a provider request is still running. The observer must stay lightweight: it is called from the same worker that executes the model request and the actual tool invocation.
class ConsoleToolObserver implements LLMToolCallObserver:
public override beforeToolCall(call as ToolCall) as Void:
print("tool: " + call.name)| Modifier and Type | Member | Description |
|---|---|---|
| public | afterToolCall | Called after a tool executed successfully. |
| public | beforeToolCallbeforeToolCall(call as ToolCall) as Void |
Called just before a tool is executed. |
| public | toolCallFailed | Called when a tool cannot be executed. |