Class AiServiceStartedEvent.AiServiceStartedEventBuilder
java.lang.Object
dev.langchain4j.observability.api.event.AiServiceEvent.Builder<AiServiceStartedEvent>
dev.langchain4j.observability.api.event.AiServiceStartedEvent.AiServiceStartedEventBuilder
- Enclosing interface:
AiServiceStartedEvent
public static class AiServiceStartedEvent.AiServiceStartedEventBuilder
extends AiServiceEvent.Builder<AiServiceStartedEvent>
Builder for
DefaultAiServiceStartedEvent
instances.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
protected
Creates a builder initialized from an existingAiServiceStartedEvent
. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aAiServiceStartedEvent
.invocationContext
(InvocationContext invocationContext) Sets the invocation context.@Nullable SystemMessage
systemMessage
(@Nullable SystemMessage systemMessage) Sets a system message.systemMessage
(Optional<SystemMessage> systemMessage) Sets an optional system message.userMessage
(UserMessage userMessage) Sets the user message.Methods inherited from class AiServiceEvent.Builder
invocationContext
-
Constructor Details
-
AiServiceStartedEventBuilder
protected AiServiceStartedEventBuilder() -
AiServiceStartedEventBuilder
Creates a builder initialized from an existingAiServiceStartedEvent
.
-
-
Method Details
-
invocationContext
public AiServiceStartedEvent.AiServiceStartedEventBuilder invocationContext(InvocationContext invocationContext) Sets the invocation context.- Overrides:
invocationContext
in classAiServiceEvent.Builder<AiServiceStartedEvent>
-
systemMessage
public AiServiceStartedEvent.AiServiceStartedEventBuilder systemMessage(@Nullable SystemMessage systemMessage) Sets a system message. -
systemMessage
public AiServiceStartedEvent.AiServiceStartedEventBuilder systemMessage(Optional<SystemMessage> systemMessage) Sets an optional system message. -
userMessage
Sets the user message. -
build
Builds aAiServiceStartedEvent
.- Specified by:
build
in classAiServiceEvent.Builder<AiServiceStartedEvent>
-
systemMessage
-
userMessage
-