Uses of Class
dev.langchain4j.agent.tool.ToolExecutionRequest
Packages that use ToolExecutionRequest
Package
Description
Model mocks for tests: they need no network, answer the way a test tells them to, and record the requests they
receive.
-
Uses of ToolExecutionRequest in dev.langchain4j.agent.tool
Methods in dev.langchain4j.agent.tool that return ToolExecutionRequestModifier and TypeMethodDescriptionToolExecutionRequest.Builder.build()Returns aToolExecutionRequestbuilt from the parameters previously set. -
Uses of ToolExecutionRequest in dev.langchain4j.agentic.agent
Method parameters in dev.langchain4j.agentic.agent with type arguments of type ToolExecutionRequestModifier and TypeMethodDescriptionAgentBuilder.hallucinatedToolNameStrategy(Function<ToolExecutionRequest, ToolExecutionResultMessage> hallucinatedToolNameStrategy) Sets the strategy for handling tool calls when the model hallucinates a non-existent tool name. -
Uses of ToolExecutionRequest in dev.langchain4j.data.message
Methods in dev.langchain4j.data.message that return types with arguments of type ToolExecutionRequestModifier and TypeMethodDescriptionAiMessage.toolExecutionRequests()Get the tool execution requests of the message.Methods in dev.langchain4j.data.message with parameters of type ToolExecutionRequestModifier and TypeMethodDescriptionstatic AiMessageAiMessage.aiMessage(ToolExecutionRequest... toolExecutionRequests) Create a newAiMessagewith the given tool execution requests.static AiMessageAiMessage.from(ToolExecutionRequest... toolExecutionRequests) Create a newAiMessagewith the given tool execution requests.static ToolExecutionResultMessageToolExecutionResultMessage.from(ToolExecutionRequest request, String toolExecutionResult) Creates aToolExecutionResultMessagefrom aToolExecutionRequestand the result of the tool execution.static ToolExecutionResultMessageToolExecutionResultMessage.toolExecutionResultMessage(ToolExecutionRequest request, String toolExecutionResult) Creates aToolExecutionResultMessagefrom aToolExecutionRequestand the result of the tool execution.Method parameters in dev.langchain4j.data.message with type arguments of type ToolExecutionRequestModifier and TypeMethodDescriptionstatic AiMessageAiMessage.aiMessage(String text, List<ToolExecutionRequest> toolExecutionRequests) Create a newAiMessagewith the given text and tool execution requests.static AiMessageAiMessage.aiMessage(List<ToolExecutionRequest> toolExecutionRequests) Create a newAiMessagewith the given tool execution requests.static AiMessageAiMessage.from(String text, List<ToolExecutionRequest> toolExecutionRequests) Create a newAiMessagewith the given text and tool execution requests.static AiMessageAiMessage.from(List<ToolExecutionRequest> toolExecutionRequests) Create a newAiMessagewith the given tool execution requests.AiMessage.Builder.toolExecutionRequests(List<ToolExecutionRequest> toolExecutionRequests) Constructor parameters in dev.langchain4j.data.message with type arguments of type ToolExecutionRequestModifierConstructorDescriptionAiMessage(String text, List<ToolExecutionRequest> toolExecutionRequests) Create a newAiMessagewith the given text and tool execution requests.AiMessage(List<ToolExecutionRequest> toolExecutionRequests) Create a newAiMessagewith the given tool execution requests. -
Uses of ToolExecutionRequest in dev.langchain4j.guardrail
Methods in dev.langchain4j.guardrail that return ToolExecutionRequestModifier and TypeMethodDescriptionToolInputGuardrailRequest.toolExecutionRequest()ToolOutputGuardrailRequest.toolExecutionRequest()Methods in dev.langchain4j.guardrail that return types with arguments of type ToolExecutionRequestModifier and TypeMethodDescriptionToolInputGuardrailException.toolExecutionRequest()Gets the tool call that the failure stopped: its id, the name of the tool and its arguments, as the failing guardrail validated them: after the rewrites of the guardrails that ran before it (the arguments the LLM sent if none of them rewrote them).ToolOutputGuardrailException.toolExecutionRequest()Gets the tool call that the failure stopped: its id, the name of the tool and its arguments, as the tool was executed with them (after the rewrites of the input guardrails).Methods in dev.langchain4j.guardrail with parameters of type ToolExecutionRequestModifier and TypeMethodDescriptionToolInputGuardrailRequest.Builder.toolExecutionRequest(ToolExecutionRequest toolExecutionRequest) Sets the tool execution request, required.ToolOutputGuardrailRequest.Builder.toolExecutionRequest(ToolExecutionRequest toolExecutionRequest) Sets the tool execution request, required. -
Uses of ToolExecutionRequest in dev.langchain4j.internal
Methods in dev.langchain4j.internal that return types with arguments of type ToolExecutionRequest -
Uses of ToolExecutionRequest in dev.langchain4j.mcp
Methods in dev.langchain4j.mcp with parameters of type ToolExecutionRequestModifier and TypeMethodDescriptionMcpToolExecutor.execute(ToolExecutionRequest executionRequest, Object memoryId) McpToolExecutor.executeAsync(ToolExecutionRequest executionRequest, InvocationContext invocationContext) Non-blocking counterpart ofToolExecutor.executeWithContext(ToolExecutionRequest, InvocationContext), invoked by the asynchronous AI Service tool loop (AI Service methods returningCompletableFutureorCompletionStage), which composes the returned future instead of waiting on a thread.McpToolExecutor.executeWithContext(ToolExecutionRequest executionRequest, InvocationContext invocationContext) -
Uses of ToolExecutionRequest in dev.langchain4j.mcp.client
Methods in dev.langchain4j.mcp.client with parameters of type ToolExecutionRequestModifier and TypeMethodDescriptionDefaultMcpClient.executeTool(ToolExecutionRequest executionRequest) DefaultMcpClient.executeTool(ToolExecutionRequest executionRequest, InvocationContext invocationContext) McpClient.executeTool(ToolExecutionRequest executionRequest) Executes a tool on the MCP server and returns the result.McpClient.executeTool(ToolExecutionRequest executionRequest, InvocationContext invocationContext) Executes a tool on the MCP server and returns the result.DefaultMcpClient.executeToolAsync(ToolExecutionRequest executionRequest, InvocationContext invocationContext) Non-blocking counterpart ofMcpClient.executeTool(ToolExecutionRequest, InvocationContext): executes a tool on the MCP server without holding a thread while the result is in flight.default CompletableFuture<ToolExecutionResult> McpClient.executeToolAsync(ToolExecutionRequest executionRequest, InvocationContext invocationContext) Non-blocking counterpart ofMcpClient.executeTool(ToolExecutionRequest, InvocationContext): executes a tool on the MCP server without holding a thread while the result is in flight. -
Uses of ToolExecutionRequest in dev.langchain4j.model.chat.response
Methods in dev.langchain4j.model.chat.response that return ToolExecutionRequestModifier and TypeMethodDescriptionCompleteToolCall.toolExecutionRequest()A fully constructedToolExecutionRequestthat is ready for execution.Constructors in dev.langchain4j.model.chat.response with parameters of type ToolExecutionRequestModifierConstructorDescriptionCompleteToolCall(int index, ToolExecutionRequest toolExecutionRequest) -
Uses of ToolExecutionRequest in dev.langchain4j.model.google.genai
Method parameters in dev.langchain4j.model.google.genai with type arguments of type ToolExecutionRequestModifier and TypeMethodDescriptionintGoogleGenAiTokenCountEstimator.estimateTokenCountInToolExecutionRequests(Iterable<ToolExecutionRequest> toolExecutionRequests) -
Uses of ToolExecutionRequest in dev.langchain4j.model.googleai
Method parameters in dev.langchain4j.model.googleai with type arguments of type ToolExecutionRequestModifier and TypeMethodDescriptionintGoogleAiGeminiTokenCountEstimator.estimateTokenCountInToolExecutionRequests(Iterable<ToolExecutionRequest> toolExecutionRequests) -
Uses of ToolExecutionRequest in dev.langchain4j.model.mistralai.internal.mapper
Methods in dev.langchain4j.model.mistralai.internal.mapper that return ToolExecutionRequestModifier and TypeMethodDescriptionstatic ToolExecutionRequestMistralAiMapper.toToolExecutionRequest(MistralAiToolCall mistralAiToolCall) Methods in dev.langchain4j.model.mistralai.internal.mapper that return types with arguments of type ToolExecutionRequestModifier and TypeMethodDescriptionstatic List<ToolExecutionRequest> MistralAiMapper.toToolExecutionRequests(List<MistralAiToolCall> mistralAiToolCalls) -
Uses of ToolExecutionRequest in dev.langchain4j.observability.api.event
Methods in dev.langchain4j.observability.api.event that return ToolExecutionRequestModifier and TypeMethodDescriptionToolCompensatedEvent.request()Gets theToolExecutionRequestof the tool that was compensated.ToolCompensatedEvent.ToolCompensatedEventBuilder.request()ToolExecutedEvent.request()Gets theToolExecutionRequestthat initiated the tool execution.ToolExecutedEvent.ToolExecutedEventBuilder.request()Methods in dev.langchain4j.observability.api.event with parameters of type ToolExecutionRequestModifier and TypeMethodDescriptionToolCompensatedEvent.ToolCompensatedEventBuilder.request(ToolExecutionRequest request) Sets the compensated tool's request.ToolExecutedEvent.ToolExecutedEventBuilder.request(ToolExecutionRequest request) Sets the tool execution request. -
Uses of ToolExecutionRequest in dev.langchain4j.observability.event
Methods in dev.langchain4j.observability.event that return ToolExecutionRequest -
Uses of ToolExecutionRequest in dev.langchain4j.service
Method parameters in dev.langchain4j.service with type arguments of type ToolExecutionRequestModifier and TypeMethodDescriptionAiServices.hallucinatedToolNameStrategy(Function<ToolExecutionRequest, ToolExecutionResultMessage> hallucinatedToolNameStrategy) Configures the strategy to be used when the LLM hallucinates a tool name (i.e., attempts to call a nonexistent tool). -
Uses of ToolExecutionRequest in dev.langchain4j.service.guardrail
Methods in dev.langchain4j.service.guardrail that return ToolExecutionRequestModifier and TypeMethodDescriptionGuardedToolExecution.request()The tool call as the input guardrails left it: the request of the LLM, with the arguments rewritten by the input guardrails if they rewrote them.Methods in dev.langchain4j.service.guardrail with parameters of type ToolExecutionRequestModifier and TypeMethodDescriptiondefault GuardedToolExecutionToolGuardrailService.executeGuardrails(ToolGuardrailService.ToolKey key, ToolExecutionRequest request, GuardrailRequestParams requestParams, Function<ToolExecutionRequest, ToolExecutionResult> tool) Executes a tool call through the tool guardrails of the tool: the input guardrails, thentool, then the output guardrails.default CompletableFuture<GuardedToolExecution> ToolGuardrailService.executeGuardrailsAsync(ToolGuardrailService.ToolKey key, ToolExecutionRequest request, GuardrailRequestParams requestParams, Function<ToolExecutionRequest, CompletableFuture<ToolExecutionResult>> tool) Non-blocking counterpart ofToolGuardrailService.executeGuardrails(ToolKey, ToolExecutionRequest, GuardrailRequestParams, Function), with the same rules, for the asynchronous (CompletableFuture) and reactive (Flow.Publisher) AI service modes.GuardedToolExecution.Builder.request(ToolExecutionRequest request) Method parameters in dev.langchain4j.service.guardrail with type arguments of type ToolExecutionRequestModifier and TypeMethodDescriptiondefault GuardedToolExecutionToolGuardrailService.executeGuardrails(ToolGuardrailService.ToolKey key, ToolExecutionRequest request, GuardrailRequestParams requestParams, Function<ToolExecutionRequest, ToolExecutionResult> tool) Executes a tool call through the tool guardrails of the tool: the input guardrails, thentool, then the output guardrails.default CompletableFuture<GuardedToolExecution> ToolGuardrailService.executeGuardrailsAsync(ToolGuardrailService.ToolKey key, ToolExecutionRequest request, GuardrailRequestParams requestParams, Function<ToolExecutionRequest, CompletableFuture<ToolExecutionResult>> tool) Non-blocking counterpart ofToolGuardrailService.executeGuardrails(ToolKey, ToolExecutionRequest, GuardrailRequestParams, Function), with the same rules, for the asynchronous (CompletableFuture) and reactive (Flow.Publisher) AI service modes. -
Uses of ToolExecutionRequest in dev.langchain4j.service.tool
Classes in dev.langchain4j.service.tool that implement interfaces with type arguments of type ToolExecutionRequestMethods in dev.langchain4j.service.tool that return ToolExecutionRequestModifier and TypeMethodDescriptionBeforeToolExecution.request()Returns the tool execution request that is about to be executed.ToolExecution.request()Returns the request of the tool execution.ToolErrorContext.toolExecutionRequest()Methods in dev.langchain4j.service.tool that return types with arguments of type ToolExecutionRequestModifier and TypeMethodDescriptionToolExecutionRound.Outcome.requests()The calls as they were executed, in the order of the LLM.ToolExecutionRound.Outcome.results()The result of each call, by the call as it was executed.ToolService.CombinedToolResults.results()Returns the value of theresultsrecord component.Methods in dev.langchain4j.service.tool with parameters of type ToolExecutionRequestModifier and TypeMethodDescriptionHallucinatedToolNameStrategy.apply(ToolExecutionRequest toolExecutionRequest) ToolService.applyToolHallucinationStrategy(ToolExecutionRequest toolRequest) DefaultToolExecutor.execute(ToolExecutionRequest request, Object memoryId) ToolExecutor.execute(ToolExecutionRequest request, Object memoryId) Executes a tool request.DefaultToolExecutor.executeAsync(ToolExecutionRequest request, InvocationContext context) Non-blocking counterpart ofToolExecutor.executeWithContext(ToolExecutionRequest, InvocationContext), invoked by the asynchronous AI Service tool loop (AI Service methods returningCompletableFutureorCompletionStage), which composes the returned future instead of waiting on a thread.default CompletableFuture<ToolExecutionResult> ToolExecutor.executeAsync(ToolExecutionRequest request, InvocationContext context) Non-blocking counterpart ofToolExecutor.executeWithContext(ToolExecutionRequest, InvocationContext), invoked by the asynchronous AI Service tool loop (AI Service methods returningCompletableFutureorCompletionStage), which composes the returned future instead of waiting on a thread.ToolExecutionRound.executeTool(ToolExecutionRequest call, Consumer<BeforeToolExecution> beforeToolExecution, Consumer<ToolExecution> afterToolExecution) Executes a call of the round, blocking: its tool, through the tool guardrails of the tool if it has any, with the callbacks of theToolServiceand the given ones.ToolService.executeTool(InvocationContext invocationContext, Map<String, ToolExecutor> toolExecutors, ToolExecutionRequest toolRequest, Consumer<BeforeToolExecution> externalBeforeToolExecution, Consumer<ToolExecution> externalAfterToolExecution) Deprecated.It cannot apply the tool guardrails of every tool.ToolExecutionRound.executeToolAsync(ToolExecutionRequest call, Consumer<BeforeToolExecution> beforeToolExecution, Consumer<ToolExecution> afterToolExecution, Executor executor) Executes a call of the round on a thread ofexecutor, blocking that thread, asToolExecutionRound.executeTool(ToolExecutionRequest, Consumer, Consumer)does.DefaultToolExecutor.executeWithContext(ToolExecutionRequest request, InvocationContext context) default ToolExecutionResultToolExecutor.executeWithContext(ToolExecutionRequest request, InvocationContext context) Executes a tool request.static ToolExecutionResultToolService.executeWithErrorHandling(ToolExecutionRequest toolRequest, ToolExecutor toolExecutor, InvocationContext invocationContext, ToolArgumentsErrorHandler argumentsErrorHandler, ToolExecutionErrorHandler executionErrorHandler) BeforeToolExecution.Builder.request(ToolExecutionRequest request) ToolExecution.Builder.request(ToolExecutionRequest request) ToolExecutionRound.startTool(ToolExecutionRequest call, Consumer<BeforeToolExecution> beforeToolExecution, Consumer<ToolExecution> afterToolExecution, Executor executor) Starts a call of the round onexecutor, asToolExecutionRound.executeTool(ToolExecutionRequest, Consumer, Consumer)does, without blocking.ToolService.startTool(ToolExecutionRequest toolRequest, Map<String, ToolExecutor> toolExecutors, InvocationContext invocationContext, Consumer<BeforeToolExecution> externalBeforeToolExecution, Consumer<ToolExecution> externalAfterToolExecution, Executor executor) Deprecated.It cannot apply the tool guardrails of every tool.ToolErrorContext.Builder.toolExecutionRequest(ToolExecutionRequest toolExecutionRequest) Method parameters in dev.langchain4j.service.tool with type arguments of type ToolExecutionRequestModifier and TypeMethodDescriptionToolService.collectCompensableRound(List<ToolExecutionRequest> toolExecutionRequests, Map<ToolExecutionRequest, ToolExecutionResult> toolResults, List<ToolService.CompensableToolExecution> compensableExecutions, InvocationContext invocationContext) Records one completed round's successful compensable tool executions into the sharedaccumulatorand returns the first errored tool's name (ornull).ToolService.collectCompensableRound(List<ToolExecutionRequest> toolExecutionRequests, Map<ToolExecutionRequest, ToolExecutionResult> toolResults, List<ToolService.CompensableToolExecution> compensableExecutions, InvocationContext invocationContext) Records one completed round's successful compensable tool executions into the sharedaccumulatorand returns the first errored tool's name (ornull).ToolService.combineToolResultsCollectingErrors(Map<ToolExecutionRequest, CompletableFuture<ToolExecutionResult>> futures) Combines a set of in-flight (possibly already-started) tool executions into a single future of their results, keyed and ordered by request.voidToolService.compensateIfNeeded(List<ToolExecutionRequest> toolExecutionRequests, Map<ToolExecutionRequest, ToolExecutionResult> toolResults, List<ToolExecutionResultMessage> resultMessages, List<ToolService.CompensableToolExecution> compensableExecutions, boolean anyToolErrored, ChatMemory chatMemory, List<ChatMessage> messages, InvocationContext invocationContext, AiServiceListenerRegistrar listenerRegistrar) Synchronous tool compensation, used by the synchronous /TokenStreammodes.voidToolService.compensateIfNeeded(List<ToolExecutionRequest> toolExecutionRequests, Map<ToolExecutionRequest, ToolExecutionResult> toolResults, List<ToolExecutionResultMessage> resultMessages, List<ToolService.CompensableToolExecution> compensableExecutions, boolean anyToolErrored, ChatMemory chatMemory, List<ChatMessage> messages, InvocationContext invocationContext, AiServiceListenerRegistrar listenerRegistrar) Synchronous tool compensation, used by the synchronous /TokenStreammodes.voidToolService.compensateOnCancellation(ToolExecutionRound.Outcome currentRound, @Nullable List<ToolExecutionRequest> unsavedRequests, @Nullable List<ToolService.CompensableToolExecution> compensableExecutions, @Nullable ChatMemory chatMemory, InvocationContext invocationContext, AiServiceListenerRegistrar listenerRegistrar) Blocking counterpart ofToolService.compensateOnCancellationAsync(ToolExecutionRound.Outcome, List, List, ChatMemory, List, InvocationContext, AiServiceListenerRegistrar), used by theTokenStreammode, which uses the chat memory synchronously: rolls back, on cancellation, every compensable tool that had already executed successfully, across all rounds, on the calling thread.ToolService.compensateOnCancellationAsync(@Nullable ToolExecutionRound.Outcome currentRound, @Nullable List<ToolExecutionRequest> unsavedRequests, @Nullable List<ToolService.CompensableToolExecution> compensableExecutions, @Nullable ChatMemory chatMemory, @Nullable List<ChatMessage> messages, InvocationContext invocationContext, AiServiceListenerRegistrar listenerRegistrar) 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.ToolExecutionRound.complete(List<ToolExecutionRequest> calls) Completes the round once every call has been executed, and reports the calls as they were executed with their results.ToolExecutionRound.completeAsync(List<ToolExecutionRequest> calls) Non-blocking counterpart ofToolExecutionRound.complete(List), for calls started withToolExecutionRound.startTool(ToolExecutionRequest, Consumer, Consumer, Executor): waits until every call has ended, normally or not, and reports them all.ToolExecutionRound.completeAsync(List<ToolExecutionRequest> calls, List<ToolExecutionRequest> aiMessageCalls) AsToolExecutionRound.completeAsync(List), for calls started before theAiMessagewas known (a streaming model announces each tool call before its final response), with requests that can differ from the ones of theAiMessage: a provider can give a call another id in its final response, or format its arguments differently.voidToolExecutionRound.failBeforeRethrow(List<ToolExecutionRequest> calls, Throwable errorToRethrow, List<ToolService.CompensableToolExecution> compensableExecutions, ChatMemory chatMemory, List<ChatMessage> messages) Fails a blocking round whose calls have all ended, when a call failed with an exception that ends the invocation, right before the caller rethrowserrorToRethrow, the way the non-blocking modes fail a round: it fires aToolExecutedEventfor each call that ended, with the request it was executed with, tells cross-agent compensation about the calls that ran successfully and that a call failed, and rolls back the compensable tools that ran successfully in this round and in the earlier rounds, when compensation on tool errors is enabled.static voidToolService.fireToolExecutedEventsOfFailedRound(InvocationContext invocationContext, List<ToolExecutionRequest> toolRequests, Map<ToolExecutionRequest, ToolExecutionResult> results, Map<ToolExecutionRequest, Throwable> errors, AiServiceListenerRegistrar listenerRegistrar) Fires aToolExecutedEventfor each tool of a round that has terminated, in the order the tools were requested, before a tool error that fails the invocation is rethrown: the tools that returned a result, and the tools whose error is rethrown (withToolExecutedEvent.isError()true).static voidToolService.fireToolExecutedEventsOfFailedRound(InvocationContext invocationContext, List<ToolExecutionRequest> toolRequests, Map<ToolExecutionRequest, ToolExecutionResult> results, Map<ToolExecutionRequest, Throwable> errors, AiServiceListenerRegistrar listenerRegistrar) Fires aToolExecutedEventfor each tool of a round that has terminated, in the order the tools were requested, before a tool error that fails the invocation is rethrown: the tools that returned a result, and the tools whose error is rethrown (withToolExecutedEvent.isError()true).voidToolService.hallucinatedToolNameStrategy(Function<ToolExecutionRequest, ToolExecutionResultMessage> toolHallucinationStrategy) ToolService.prepareNextChatRequest(AiServiceContext context, Object memoryId, List<ChatMessage> messages, InvocationContext invocationContext, ToolServiceContext toolServiceContext, Map<ToolExecutionRequest, ToolExecutionResult> toolResults, ChatRequestParameters parameters) Builds the next round'sChatRequest, shared by every AI Service mode: given the already-resolvedmessagesto send (seeToolService.resolveMessagesForNextRequest(List, AiServiceContext, InvocationContext)), it refreshes dynamic tool providers, folds in any tools found by tool search, overrides the tool specifications on the carried-forwardparameters, applies the chat-request transformer, and fires theAiServiceRequestIssuedEvent.ToolService.processToolResults(AiServiceContext context, List<ToolExecutionRequest> toolExecutionRequests, Map<ToolExecutionRequest, ToolExecutionResult> toolResults, List<ToolExecution> toolExecutions, InvocationContext invocationContext, ToolServiceContext toolServiceContext) Per-round bookkeeping shared by every AI Service mode (sync,CompletableFuture,TokenStream, reactiveFlow.Publisher): for each executed tool it records aToolExecution, fires theToolExecutedEvent, collects the tool-result message (in request order), and accumulatesanyToolErrored+ the per-toolReturnBehaviors.ToolService.processToolResults(AiServiceContext context, List<ToolExecutionRequest> toolExecutionRequests, Map<ToolExecutionRequest, ToolExecutionResult> toolResults, List<ToolExecution> toolExecutions, InvocationContext invocationContext, ToolServiceContext toolServiceContext) Per-round bookkeeping shared by every AI Service mode (sync,CompletableFuture,TokenStream, reactiveFlow.Publisher): for each executed tool it records aToolExecution, fires theToolExecutedEvent, collects the tool-result message (in request order), and accumulatesanyToolErrored+ the per-toolReturnBehaviors.Constructors in dev.langchain4j.service.tool with parameters of type ToolExecutionRequestModifierConstructorDescriptionDefaultToolExecutor(Object object, ToolExecutionRequest toolExecutionRequest) Constructor parameters in dev.langchain4j.service.tool with type arguments of type ToolExecutionRequestModifierConstructorDescriptionCombinedToolResults(Map<ToolExecutionRequest, ToolExecutionResult> results, Throwable firstError) Creates an instance of aCombinedToolResultsrecord class. -
Uses of ToolExecutionRequest in dev.langchain4j.service.tool.search
Methods in dev.langchain4j.service.tool.search that return ToolExecutionRequestModifier and TypeMethodDescriptionToolSearchRequest.toolExecutionRequest()Returns the tool call containing the search query.Methods in dev.langchain4j.service.tool.search with parameters of type ToolExecutionRequestModifier and TypeMethodDescriptionToolSearchRequest.Builder.toolExecutionRequest(ToolExecutionRequest toolExecutionRequest) -
Uses of ToolExecutionRequest in dev.langchain4j.test.mock
Methods in dev.langchain4j.test.mock that return ToolExecutionRequestModifier and TypeMethodDescriptionstatic ToolExecutionRequestA call of the given tool without an id, likeMockChatModel.toolCall(String, Map), for arguments that cannot be given as a map, for example invalid JSON.static ToolExecutionRequestA call of the given tool without an id, to build an answer withAiMessage.from(...), for example inMockChatModel.thatResponds(Function)or for several tool calls in one answer.