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 classBuilder forDefaultAiServiceResponseReceivedEventinstances.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.request()Retrieves the chat request from 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
-
request
ChatRequest request()Retrieves the chat request from the AI Service invocation event.- Returns:
- the
ChatRequestobject containing the request sent to the LLM.
-
response
ChatResponse response()Retrieves the chat response from the AI Service invocation event.- Returns:
- the
ChatResponseobject containing the AI-generated message and related metadata.
-
eventClass
Description copied from interface:AiServiceEventRetrieves the class type of the event, representing the specific category of the AI Service invocation event.- Specified by:
eventClassin interfaceAiServiceEvent
-
toBuilder
Description copied from interface:AiServiceEventCreates a new builder instance initialized with the properties of thisAiServiceEvent. This allows modification of the existing properties and reconstruction of the event.- Specified by:
toBuilderin interfaceAiServiceEvent
-
builder
-