Uses of Class
dev.langchain4j.service.tool.ToolExecution
Packages that use ToolExecution
Package
Description
-
Uses of ToolExecution in dev.langchain4j.agentic.observability
Methods in dev.langchain4j.agentic.observability that return ToolExecutionModifier and TypeMethodDescriptionAfterAgentToolExecution.toolExecution()Returns the value of thetoolExecutionrecord component.Methods in dev.langchain4j.agentic.observability that return types with arguments of type ToolExecutionConstructors in dev.langchain4j.agentic.observability with parameters of type ToolExecutionModifierConstructorDescriptionAfterAgentToolExecution(AgentInstance agentInstance, ToolExecution toolExecution) Creates an instance of aAfterAgentToolExecutionrecord class. -
Uses of ToolExecution in dev.langchain4j.agentic.scope
Methods in dev.langchain4j.agentic.scope with parameters of type ToolExecutionModifier and TypeMethodDescriptionvoidDefaultAgenticScope.registerCompensableExecution(ToolExecution toolExecution, Consumer<ToolExecution> compensatingAction) Method parameters in dev.langchain4j.agentic.scope with type arguments of type ToolExecutionModifier and TypeMethodDescriptionvoidDefaultAgenticScope.registerCompensableExecution(ToolExecution toolExecution, Consumer<ToolExecution> compensatingAction) -
Uses of ToolExecution in dev.langchain4j.service
Methods in dev.langchain4j.service that return ToolExecutionModifier and TypeMethodDescriptionAiServiceStreamingEvent.AfterToolExecutionEvent.toolExecution()AiServiceStreamingEvent.ToolCompensatedEvent.toolExecution()Methods in dev.langchain4j.service that return types with arguments of type ToolExecutionModifier and TypeMethodDescriptionResult.toolExecutions()Returns all tool executions that happened during AI Service invocation.Method parameters in dev.langchain4j.service with type arguments of type ToolExecutionModifier and TypeMethodDescriptionAiServices.afterToolExecution(Consumer<ToolExecution> afterToolExecution) Configures a callback to be invoked after each tool execution.AiServiceTokenStream.onToolExecuted(Consumer<ToolExecution> toolExecutionHandler) TokenStream.onToolExecuted(Consumer<ToolExecution> toolExecuteHandler) The provided consumer will be invoked right after a tool is executed.Result.ResultBuilder.toolExecutions(List<ToolExecution> toolExecutions) Constructors in dev.langchain4j.service with parameters of type ToolExecutionModifierConstructorDescriptionAfterToolExecutionEvent(ToolExecution toolExecution, InvocationContext invocationContext) ToolCompensatedEvent(ToolExecution toolExecution, CompensationReason reason, InvocationContext invocationContext) -
Uses of ToolExecution in dev.langchain4j.service.tool
Methods in dev.langchain4j.service.tool that return ToolExecutionModifier and TypeMethodDescriptionToolExecution.Builder.build()ToolService.CompensableToolExecution.toolExecution()Returns the value of thetoolExecutionrecord component.Methods in dev.langchain4j.service.tool that return types with arguments of type ToolExecutionModifier and TypeMethodDescriptionToolService.afterToolExecution()ToolServiceResult.toolExecutions()Method parameters in dev.langchain4j.service.tool with type arguments of type ToolExecutionModifier and TypeMethodDescriptionvoidToolService.afterToolExecution(Consumer<ToolExecution> afterToolExecution) ToolService.compensateIfNeededAsync(List<ToolExecutionRequest> toolExecutionRequests, Map<ToolExecutionRequest, ToolExecutionResult> toolResults, List<ToolExecutionResultMessage> resultMessages, List<ToolService.CompensableToolExecution> compensableExecutions, boolean anyToolErrored, ChatMemory chatMemory, List<ChatMessage> messages, InvocationContext invocationContext, CompensationReason reason, AiServiceListenerRegistrar listenerRegistrar, BiConsumer<ToolExecution, CompensationReason> streamEmitter) Non-blocking counterpart ofToolService.compensateIfNeeded(List, Map, List, List, boolean, ChatMemory, List, InvocationContext, AiServiceListenerRegistrar), used by theCompletableFutureand reactive modes.ToolService.compensateIfNeededAsync(List<ToolExecutionRequest> toolExecutionRequests, Map<ToolExecutionRequest, ToolExecutionResult> toolResults, List<ToolExecutionResultMessage> resultMessages, List<ToolService.CompensableToolExecution> compensableExecutions, boolean anyToolErrored, ChatMemory chatMemory, List<ChatMessage> messages, InvocationContext invocationContext, CompensationReason reason, AiServiceListenerRegistrar listenerRegistrar, BiConsumer<ToolExecution, CompensationReason> streamEmitter, boolean alreadyCollected, String preCollectedFailedToolName) AsToolService.compensateIfNeededAsync(List, Map, List, List, boolean, ChatMemory, List, InvocationContext, CompensationReason, AiServiceListenerRegistrar, BiConsumer), but whenalreadyCollectedistruethis round's compensable tools have already been recorded intocompensableExecutions(viaToolService.collectCompensableRound(List, Map, List, InvocationContext)) andpreCollectedFailedToolNamecarries the collect's result; the collection step is then skipped.ToolService.compensateOnCancellationAsync(List<ToolExecutionRequest> currentRoundRequests, Map<ToolExecutionRequest, ToolExecutionResult> currentRoundResults, List<ToolService.CompensableToolExecution> compensableExecutions, ChatMemory chatMemory, List<ChatMessage> messages, InvocationContext invocationContext, AiServiceListenerRegistrar listenerRegistrar, BiConsumer<ToolExecution, CompensationReason> streamEmitter) Rolls back, on cancellation, every compensable tool that had already executed successfully - across all rounds - implementing the "drain the round, then roll back" contract for the asynchronous and reactive modes.voidToolService.onCompensableToolExecution(BiConsumer<ToolExecution, Consumer<ToolExecution>> onCompensableToolExecution) voidToolService.onCompensableToolExecution(BiConsumer<ToolExecution, Consumer<ToolExecution>> onCompensableToolExecution) ToolServiceResult.Builder.toolExecutions(List<ToolExecution> toolExecutions) Constructors in dev.langchain4j.service.tool with parameters of type ToolExecutionModifierConstructorDescriptionCompensableToolExecution(ToolExecution toolExecution, ToolExecutionResultMessage resultMessage) Creates an instance of aCompensableToolExecutionrecord class.Constructor parameters in dev.langchain4j.service.tool with type arguments of type ToolExecutionModifierConstructorDescriptionToolServiceResult(ChatResponse chatResponse, List<ToolExecution> toolExecutions) Deprecated.
ToolServiceResult(Builder)instead