Class DefaultToolCompensatedEvent
java.lang.Object
dev.langchain4j.observability.event.AbstractAiServiceEvent
dev.langchain4j.observability.event.DefaultToolCompensatedEvent
- All Implemented Interfaces:
AiServiceEvent, ToolCompensatedEvent
@Experimental
public class DefaultToolCompensatedEvent
extends AbstractAiServiceEvent
implements ToolCompensatedEvent
Default implementation of
ToolCompensatedEvent.- Since:
- 1.20.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface AiServiceEvent
AiServiceEvent.Builder<T>Nested classes/interfaces inherited from interface ToolCompensatedEvent
ToolCompensatedEvent.ToolCompensatedEventBuilder -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionreason()Returns why the tool was compensated.request()Gets theToolExecutionRequestof the tool that was compensated.Returns the contents of the compensated tool's original (successful) result.Returns the original (successful) result of the compensated tool as a plain text string.Methods inherited from class AbstractAiServiceEvent
invocationContextMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AiServiceEvent
invocationContextMethods inherited from interface ToolCompensatedEvent
eventClass, toBuilder
-
Constructor Details
-
DefaultToolCompensatedEvent
-
-
Method Details
-
request
Description copied from interface:ToolCompensatedEventGets theToolExecutionRequestof the tool that was compensated.- Specified by:
requestin interfaceToolCompensatedEvent
-
resultText
Description copied from interface:ToolCompensatedEventReturns the original (successful) result of the compensated tool as a plain text string.- Specified by:
resultTextin interfaceToolCompensatedEvent- Returns:
- the text of the single
TextContentelement.
-
resultContents
Description copied from interface:ToolCompensatedEventReturns the contents of the compensated tool's original (successful) result.- Specified by:
resultContentsin interfaceToolCompensatedEvent- Returns:
- the list of
Contentelements, nevernull.
-
reason
Description copied from interface:ToolCompensatedEventReturns why the tool was compensated.- Specified by:
reasonin interfaceToolCompensatedEvent
-