Class AiServiceConfiguration
java.lang.Object
io.micronaut.langchain4j.aiservices.AiServiceConfiguration
Configuration of the AI services.
The settings under langchain4j.ai-services.default apply to every AI service.
The settings under langchain4j.ai-services.<name> apply to the AI service with that
name and replace the default ones.
- Since:
- 2.4.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable IntegergetName()@Nullable StringbooleanvoidsetExecuteToolsConcurrently(boolean executeToolsConcurrently) Sets whether the tools requested in a single model response are executed concurrently.voidsetMaxToolCallingRoundTrips(@Nullable Integer maxToolCallingRoundTrips) Sets the maximum number of tool calling round trips with the model per AI service call.voidsetToolExecutor(@Nullable String toolExecutor) Sets the name of the Micronaut executor (for exampleblockingorvirtual) that executes the tools whenisExecuteToolsConcurrently()is enabled.
-
Field Details
-
PREFIX
-
DEFAULT
The name of the configuration that applies to every AI service.- See Also:
-
-
Constructor Details
-
AiServiceConfiguration
-
-
Method Details
-
getName
-
getMaxToolCallingRoundTrips
- Returns:
- The maximum number of tool calling round trips with the model per AI service call
-
setMaxToolCallingRoundTrips
Sets the maximum number of tool calling round trips with the model per AI service call. Defaults to LangChain4j's limit.- Parameters:
maxToolCallingRoundTrips- The maximum number of round trips
-
isExecuteToolsConcurrently
public boolean isExecuteToolsConcurrently()- Returns:
- Whether the tools requested in a single model response are executed concurrently
-
setExecuteToolsConcurrently
public void setExecuteToolsConcurrently(boolean executeToolsConcurrently) Sets whether the tools requested in a single model response are executed concurrently. Defaults tofalse.- Parameters:
executeToolsConcurrently- Whether to execute the tools concurrently- See Also:
-
getToolExecutor
- Returns:
- The name of the executor that executes the tools concurrently
-
setToolExecutor
Sets the name of the Micronaut executor (for exampleblockingorvirtual) that executes the tools whenisExecuteToolsConcurrently()is enabled. Defaults to LangChain4j's executor.- Parameters:
toolExecutor- The executor name
-