Package dev.langchain4j.service
Class AiServiceTokenStreamParameters.Builder
java.lang.Object
dev.langchain4j.service.AiServiceTokenStreamParameters.Builder
- Enclosing class:
AiServiceTokenStreamParameters
Builder for
AiServiceTokenStreamParameters
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newAiServiceTokenStreamParameters
.context
(AiServiceContext context) Sets the AI service context.Sets the memory ID.messages
(List<ChatMessage> messages) Sets the messages.retrievedContents
(List<Content> retrievedContents) Sets the retrieved contents.toolExecutors
(Map<String, ToolExecutor> toolExecutors) Sets the tool executors.toolSpecifications
(List<ToolSpecification> toolSpecifications) Sets the tool specifications.
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
messages
Sets the messages.- Parameters:
messages
- the messages- Returns:
- this builder
-
toolSpecifications
public AiServiceTokenStreamParameters.Builder toolSpecifications(List<ToolSpecification> toolSpecifications) Sets the tool specifications.- Parameters:
toolSpecifications
- the tool specifications- Returns:
- this builder
-
toolExecutors
Sets the tool executors.- Parameters:
toolExecutors
- the tool executors- Returns:
- this builder
-
retrievedContents
Sets the retrieved contents.- Parameters:
retrievedContents
- the retrieved contents- Returns:
- this builder
-
context
Sets the AI service context.- Parameters:
context
- the AI service context- Returns:
- this builder
-
memoryId
Sets the memory ID.- Parameters:
memoryId
- the memory ID- Returns:
- this builder
-
build
Builds a newAiServiceTokenStreamParameters
.- Returns:
- a new
AiServiceTokenStreamParameters
-