Package com.alibaba.cloud.ai.graph.agent
Class Builder
java.lang.Object
com.alibaba.cloud.ai.graph.agent.Builder
- Direct Known Subclasses:
DefaultBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.ai.chat.client.advisor.observation.AdvisorObservationConventionprotected org.springframework.ai.chat.client.ChatClientprotected org.springframework.ai.chat.prompt.ChatOptionsprotected CompileConfigprotected org.springframework.ai.chat.client.observation.ChatClientObservationConventionprotected Stringprotected booleanprotected Executorprotected booleanprotected Stringprotected Typeprotected Stringprotected List<Interceptor>protected org.springframework.ai.chat.model.ChatModelprotected List<ModelInterceptor>protected Stringprotected io.micrometer.observation.ObservationRegistryprotected Stringprotected KeyStrategyprotected Stringprotected Class<?>protected booleanprotected org.springframework.ai.tool.resolution.ToolCallbackResolverprotected booleanprotected BaseCheckpointSaverprotected StateSerializerprotected Stringprotected List<org.springframework.ai.tool.ToolCallbackProvider>protected org.springframework.ai.tool.execution.ToolExecutionExceptionProcessorprotected List<ToolInterceptor>protected List<org.springframework.ai.tool.ToolCallback> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadvisorObservationConvention(org.springframework.ai.chat.client.advisor.observation.AdvisorObservationConvention advisorObservationConvention) abstract ReactAgentbuild()protected CompileConfigchatClient(org.springframework.ai.chat.client.ChatClient chatClient) Deprecated.chatOptions(org.springframework.ai.chat.prompt.ChatOptions chatOptions) compileConfig(CompileConfig compileConfig) customObservationConvention(org.springframework.ai.chat.client.observation.ChatClientObservationConvention customObservationConvention) description(String description) enableLogging(boolean enableLogging) Sets the executor for parallel nodes.includeContents(boolean includeContents) inputSchema(String inputSchema) instruction(String instruction) interceptors(Interceptor... interceptors) interceptors(List<? extends Interceptor> interceptors) methodTools(Object... toolObjects) model(org.springframework.ai.chat.model.ChatModel model) observationRegistry(io.micrometer.observation.ObservationRegistry observationRegistry) outputKeyStrategy(KeyStrategy outputKeyStrategy) outputSchema(String outputSchema) outputType(Class<?> outputType) releaseThread(boolean releaseThread) resolver(org.springframework.ai.tool.resolution.ToolCallbackResolver resolver) returnReasoningContents(boolean returnReasoningContents) saver(BaseCheckpointSaver saver) stateSerializer(StateSerializer stateSerializer) Sets the state serializer for the agent.stateSerializer(SpringAIStateSerializer stateSerializer) Deprecated.systemPrompt(String systemPrompt) toolCallbackProviders(org.springframework.ai.tool.ToolCallbackProvider... toolCallbackProviders) toolContext(Map<String, Object> toolContext) toolExecutionExceptionProcessor(org.springframework.ai.tool.execution.ToolExecutionExceptionProcessor toolExecutionExceptionProcessor) tools(org.springframework.ai.tool.ToolCallback... tools)
-
Field Details
-
name
-
description
-
instruction
-
systemPrompt
-
model
protected org.springframework.ai.chat.model.ChatModel model -
chatOptions
protected org.springframework.ai.chat.prompt.ChatOptions chatOptions -
chatClient
protected org.springframework.ai.chat.client.ChatClient chatClient -
tools
-
toolCallbackProviders
-
toolNames
-
resolver
protected org.springframework.ai.tool.resolution.ToolCallbackResolver resolver -
toolExecutionExceptionProcessor
protected org.springframework.ai.tool.execution.ToolExecutionExceptionProcessor toolExecutionExceptionProcessor -
toolContext
-
releaseThread
protected boolean releaseThread -
saver
-
compileConfig
-
hooks
-
interceptors
-
modelInterceptors
-
toolInterceptors
-
includeContents
protected boolean includeContents -
returnReasoningContents
protected boolean returnReasoningContents -
outputKey
-
outputKeyStrategy
-
inputSchema
-
inputType
-
outputSchema
-
outputType
-
observationRegistry
protected io.micrometer.observation.ObservationRegistry observationRegistry -
customObservationConvention
protected org.springframework.ai.chat.client.observation.ChatClientObservationConvention customObservationConvention -
advisorObservationConvention
protected org.springframework.ai.chat.client.advisor.observation.AdvisorObservationConvention advisorObservationConvention -
enableLogging
protected boolean enableLogging -
stateSerializer
-
executor
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
-
chatClient
Deprecated. -
model
-
chatOptions
-
tools
-
tools
-
methodTools
-
toolCallbackProviders
public Builder toolCallbackProviders(org.springframework.ai.tool.ToolCallbackProvider... toolCallbackProviders) -
toolNames
-
resolver
-
toolExecutionExceptionProcessor
public Builder toolExecutionExceptionProcessor(org.springframework.ai.tool.execution.ToolExecutionExceptionProcessor toolExecutionExceptionProcessor) -
toolContext
-
releaseThread
-
saver
-
compileConfig
-
description
-
instruction
-
systemPrompt
-
outputKey
-
outputKeyStrategy
-
inputSchema
-
inputType
-
outputSchema
-
outputType
-
includeContents
-
returnReasoningContents
-
hooks
-
hooks
-
interceptors
-
interceptors
-
observationRegistry
public Builder observationRegistry(io.micrometer.observation.ObservationRegistry observationRegistry) -
customObservationConvention
public Builder customObservationConvention(org.springframework.ai.chat.client.observation.ChatClientObservationConvention customObservationConvention) -
advisorObservationConvention
public Builder advisorObservationConvention(org.springframework.ai.chat.client.advisor.observation.AdvisorObservationConvention advisorObservationConvention) -
enableLogging
-
stateSerializer
Sets the state serializer for the agent.- Parameters:
stateSerializer- the state serializer to use- Returns:
- this builder instance
-
stateSerializer
Deprecated.UsestateSerializer(StateSerializer)insteadSets the state serializer for the agent.- Parameters:
stateSerializer- the SpringAI state serializer to use- Returns:
- this builder instance
-
executor
Sets the executor for parallel nodes.This executor will be used for all parallel nodes in the agent's execution graph. When a parallel node is executed, it will use this executor to run the parallel branches concurrently.
- Parameters:
executor- theExecutorto use for parallel nodes- Returns:
- this builder instance
-
buildConfig
-
build
-
stateSerializer(StateSerializer)instead