Uses of Class
dev.langchain4j.data.message.ToolExecutionResultMessage
Packages that use ToolExecutionResultMessage
Package
Description
-
Uses of ToolExecutionResultMessage in dev.langchain4j.agentic.agent
Method parameters in dev.langchain4j.agentic.agent with type arguments of type ToolExecutionResultMessageModifier 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 ToolExecutionResultMessage in dev.langchain4j.data.message
Methods in dev.langchain4j.data.message that return ToolExecutionResultMessageModifier and TypeMethodDescriptionToolExecutionResultMessage.Builder.build()Builds theToolExecutionResultMessage.static ToolExecutionResultMessageToolExecutionResultMessage.from(ToolExecutionRequest request, String toolExecutionResult) Creates aToolExecutionResultMessagefrom aToolExecutionRequestand the result of the tool execution.static ToolExecutionResultMessageCreates aToolExecutionResultMessagefrom aToolExecutionRequestand the result of the tool execution.static ToolExecutionResultMessageToolExecutionResultMessage.toolExecutionResultMessage(ToolExecutionRequest request, String toolExecutionResult) Creates aToolExecutionResultMessagefrom aToolExecutionRequestand the result of the tool execution.static ToolExecutionResultMessageToolExecutionResultMessage.toolExecutionResultMessage(String id, String toolName, String toolExecutionResult) Creates aToolExecutionResultMessagefrom aToolExecutionRequestand the result of the tool execution. -
Uses of ToolExecutionResultMessage in dev.langchain4j.service
Method parameters in dev.langchain4j.service with type arguments of type ToolExecutionResultMessageModifier 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 ToolExecutionResultMessage in dev.langchain4j.service.tool
Classes in dev.langchain4j.service.tool that implement interfaces with type arguments of type ToolExecutionResultMessageMethods in dev.langchain4j.service.tool that return ToolExecutionResultMessageModifier and TypeMethodDescriptionHallucinatedToolNameStrategy.apply(ToolExecutionRequest toolExecutionRequest) ToolService.CompensableToolExecution.resultMessage()Returns the value of theresultMessagerecord component.Methods in dev.langchain4j.service.tool that return types with arguments of type ToolExecutionResultMessageModifier and TypeMethodDescriptionToolService.ToolResultsOutcome.resultMessages()Returns the value of theresultMessagesrecord component.Method parameters in dev.langchain4j.service.tool with type arguments of type ToolExecutionResultMessageModifier and TypeMethodDescriptionToolService.compensateCollectedRoundAsync(ToolExecutionRound.Outcome round, List<ToolExecutionResultMessage> resultMessages, List<ToolService.CompensableToolExecution> compensableExecutions, boolean anyToolErrored, @Nullable ChatMemory chatMemory, @Nullable List<ChatMessage> messages, InvocationContext invocationContext, AiServiceListenerRegistrar listenerRegistrar, @Nullable Consumer<AiServiceStreamingEvent.ToolCompensatedEvent> streamEventEmitter, @Nullable Throwable invocationError) Non-blocking counterpart ofToolService.compensateIfNeeded(List, Map, List, List, boolean, ChatMemory, List, InvocationContext, AiServiceListenerRegistrar), used by theCompletableFutureand reactive modes, for a completedToolExecutionRoundwhose compensable tools were already collected withToolService.collectCompensableRound(ToolExecutionRound.Outcome, List, InvocationContext).voidToolService.compensateIfNeeded(ToolExecutionRound.Outcome round, List<ToolExecutionResultMessage> resultMessages, @Nullable List<ToolService.CompensableToolExecution> compensableExecutions, boolean anyToolErrored, @Nullable ChatMemory chatMemory, @Nullable List<ChatMessage> messages, InvocationContext invocationContext, AiServiceListenerRegistrar listenerRegistrar) AsToolService.compensateIfNeeded(List, Map, List, List, boolean, ChatMemory, List, InvocationContext, AiServiceListenerRegistrar), for a completedToolExecutionRound, whose calls may have gone through tool guardrails: whether a tool is compensable, and the result its compensating action gets, are the ones of the tool as it ran, and the reason of theToolCompensatedEvents tells whether a tool guardrail made the step fail.voidToolService.hallucinatedToolNameStrategy(Function<ToolExecutionRequest, ToolExecutionResultMessage> toolHallucinationStrategy) Constructors in dev.langchain4j.service.tool with parameters of type ToolExecutionResultMessageModifierConstructorDescriptionCompensableToolExecution(ToolExecution toolExecution, ToolExecution guardedExecution, ToolExecutionResultMessage resultMessage, UnaryOperator<List<Content>> resultContentsForLlm) Creates an instance of aCompensableToolExecutionrecord class.