Interface AiServiceResponseReceivedEvent
- All Superinterfaces:
AiServiceEvent
- All Known Implementing Classes:
DefaultAiServiceResponseReceivedEvent
Invoked when response from a
ChatModel
is received.
It is important to note that this can be invoked multiple times during a single AI Service invocation
when tools or guardrails exist.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Builder forDefaultAiServiceResponseReceivedEvent
instances.Nested classes/interfaces inherited from interface AiServiceEvent
AiServiceEvent.Builder<T>
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default Class
<AiServiceResponseReceivedEvent> Retrieves the class type of the event, representing the specific category of the AI Service invocation event.response()
Retrieves the chat response from the AI Service invocation event.Creates a new builder instance initialized with the properties of thisAiServiceEvent
.Methods inherited from interface AiServiceEvent
invocationContext
-
Method Details
-
response
ChatResponse response()Retrieves the chat response from the AI Service invocation event.- Returns:
- the
ChatResponse
object containing the AI-generated message and related metadata.
-
eventClass
Description copied from interface:AiServiceEvent
Retrieves the class type of the event, representing the specific category of the AI Service invocation event.- Specified by:
eventClass
in interfaceAiServiceEvent
-
toBuilder
Description copied from interface:AiServiceEvent
Creates a new builder instance initialized with the properties of thisAiServiceEvent
. This allows modification of the existing properties and reconstruction of the event.- Specified by:
toBuilder
in interfaceAiServiceEvent
-
builder
-