Class DefaultToolExecutedEvent
java.lang.Object
dev.langchain4j.observability.event.AbstractAiServiceEvent
dev.langchain4j.observability.event.DefaultToolExecutedEvent
- All Implemented Interfaces:
AiServiceEvent, ToolExecutedEvent
Default implementation of
ToolExecutedEvent.-
Nested Class Summary
Nested classes/interfaces inherited from interface AiServiceEvent
AiServiceEvent.Builder<T>Nested classes/interfaces inherited from interface ToolExecutedEvent
ToolExecutedEvent.ToolExecutedEventBuilder -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionrequest()Gets theToolExecutionRequestthat initiated the tool execution.Returns the contents of the tool execution result.Returns the tool execution result 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 ToolExecutedEvent
eventClass, toBuilder
-
Constructor Details
-
DefaultToolExecutedEvent
-
-
Method Details
-
request
Description copied from interface:ToolExecutedEventGets theToolExecutionRequestthat initiated the tool execution.- Specified by:
requestin interfaceToolExecutedEvent
-
resultText
Description copied from interface:ToolExecutedEventReturns the tool execution result as a plain text string. This is a convenience method for when the result is known to be a singleTextContent.- Specified by:
resultTextin interfaceToolExecutedEvent- Returns:
- the text of the single
TextContentelement.
-
resultContents
Description copied from interface:ToolExecutedEventReturns the contents of the tool execution result.- Specified by:
resultContentsin interfaceToolExecutedEvent- Returns:
- the list of
Contentelements, nevernull.
-