Class AiServiceResponseReceivedEvent.AiServiceResponseReceivedEventBuilder
java.lang.Object
dev.langchain4j.observability.api.event.AiServiceEvent.Builder<AiServiceResponseReceivedEvent>
dev.langchain4j.observability.api.event.AiServiceResponseReceivedEvent.AiServiceResponseReceivedEventBuilder
- Enclosing interface:
AiServiceResponseReceivedEvent
public static class AiServiceResponseReceivedEvent.AiServiceResponseReceivedEventBuilder
extends AiServiceEvent.Builder<AiServiceResponseReceivedEvent>
Builder for
DefaultAiServiceResponseReceivedEvent
instances.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
protected
Creates a builder initialized from an existingAiServiceResponseReceivedEvent
. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aAiServiceResponseReceivedEvent
.invocationContext
(InvocationContext invocationContext) Sets the invocation context.response()
response
(ChatResponse response) Sets the chat response.Methods inherited from class AiServiceEvent.Builder
invocationContext
-
Constructor Details
-
AiServiceResponseReceivedEventBuilder
protected AiServiceResponseReceivedEventBuilder() -
AiServiceResponseReceivedEventBuilder
Creates a builder initialized from an existingAiServiceResponseReceivedEvent
.
-
-
Method Details
-
response
-
invocationContext
public AiServiceResponseReceivedEvent.AiServiceResponseReceivedEventBuilder invocationContext(InvocationContext invocationContext) Sets the invocation context.- Overrides:
invocationContext
in classAiServiceEvent.Builder<AiServiceResponseReceivedEvent>
-
response
public AiServiceResponseReceivedEvent.AiServiceResponseReceivedEventBuilder response(ChatResponse response) Sets the chat response. -
build
Builds aAiServiceResponseReceivedEvent
.- Specified by:
build
in classAiServiceEvent.Builder<AiServiceResponseReceivedEvent>
-