Uses of Interface
org.springframework.ai.model.function.FunctionCallback
Package
Description
Chat client.
Provides the API for chat client advisors.
-
Uses of FunctionCallback in org.springframework.ai.anthropic
Modifier and TypeMethodDescriptionvoid
AnthropicChatOptions.setFunctionCallbacks
(List<FunctionCallback> functionCallbacks) AnthropicChatOptions.Builder.withFunctionCallbacks
(List<FunctionCallback> functionCallbacks) ModifierConstructorDescriptionAnthropicChatModel
(AnthropicApi anthropicApi, AnthropicChatOptions defaultOptions, org.springframework.retry.support.RetryTemplate retryTemplate, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks) Construct a newAnthropicChatModel
instance.AnthropicChatModel
(AnthropicApi anthropicApi, AnthropicChatOptions defaultOptions, org.springframework.retry.support.RetryTemplate retryTemplate, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, io.micrometer.observation.ObservationRegistry observationRegistry) Construct a newAnthropicChatModel
instance. -
Uses of FunctionCallback in org.springframework.ai.autoconfigure.anthropic
Modifier and TypeMethodDescriptionAnthropicAutoConfiguration.anthropicChatModel
(AnthropicApi anthropicApi, AnthropicChatProperties chatProperties, org.springframework.retry.support.RetryTemplate retryTemplate, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention) -
Uses of FunctionCallback in org.springframework.ai.autoconfigure.azure.openai
Modifier and TypeMethodDescriptionAzureOpenAiAutoConfiguration.azureOpenAiChatModel
(com.azure.ai.openai.OpenAIClientBuilder openAIClientBuilder, AzureOpenAiChatProperties chatProperties, List<FunctionCallback> toolFunctionCallbacks, FunctionCallbackContext functionCallbackContext, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention) -
Uses of FunctionCallback in org.springframework.ai.autoconfigure.bedrock.converse
Modifier and TypeMethodDescriptionBedrockConverseProxyChatAutoConfiguration.bedrockProxyChatModel
(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider, software.amazon.awssdk.regions.providers.AwsRegionProvider regionProvider, BedrockAwsConnectionProperties connectionProperties, BedrockConverseProxyChatProperties chatProperties, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention, org.springframework.beans.factory.ObjectProvider<software.amazon.awssdk.services.bedrockruntime.BedrockRuntimeClient> bedrockRuntimeClient, org.springframework.beans.factory.ObjectProvider<software.amazon.awssdk.services.bedrockruntime.BedrockRuntimeAsyncClient> bedrockRuntimeAsyncClient) -
Uses of FunctionCallback in org.springframework.ai.autoconfigure.minimax
Modifier and TypeMethodDescriptionMiniMaxAutoConfiguration.miniMaxChatModel
(MiniMaxConnectionProperties commonProperties, MiniMaxChatProperties chatProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.web.client.RestClient.Builder> restClientBuilderProvider, List<FunctionCallback> toolFunctionCallbacks, FunctionCallbackContext functionCallbackContext, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention) -
Uses of FunctionCallback in org.springframework.ai.autoconfigure.mistralai
Modifier and TypeMethodDescriptionMistralAiAutoConfiguration.mistralAiChatModel
(MistralAiCommonProperties commonProperties, MistralAiChatProperties chatProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.web.client.RestClient.Builder> restClientBuilderProvider, List<FunctionCallback> toolFunctionCallbacks, FunctionCallbackContext functionCallbackContext, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention) -
Uses of FunctionCallback in org.springframework.ai.autoconfigure.moonshot
Modifier and TypeMethodDescriptionMoonshotAutoConfiguration.moonshotChatModel
(MoonshotCommonProperties commonProperties, MoonshotChatProperties chatProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.web.client.RestClient.Builder> restClientBuilderProvider, List<FunctionCallback> toolFunctionCallbacks, FunctionCallbackContext functionCallbackContext, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention) -
Uses of FunctionCallback in org.springframework.ai.autoconfigure.ollama
Modifier and TypeMethodDescriptionOllamaAutoConfiguration.ollamaChatModel
(OllamaApi ollamaApi, OllamaChatProperties properties, OllamaInitializationProperties initProperties, List<FunctionCallback> toolFunctionCallbacks, FunctionCallbackContext functionCallbackContext, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention) -
Uses of FunctionCallback in org.springframework.ai.autoconfigure.openai
Modifier and TypeMethodDescriptionOpenAiAutoConfiguration.openAiChatModel
(OpenAiConnectionProperties commonProperties, OpenAiChatProperties chatProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.web.client.RestClient.Builder> restClientBuilderProvider, org.springframework.beans.factory.ObjectProvider<org.springframework.web.reactive.function.client.WebClient.Builder> webClientBuilderProvider, List<FunctionCallback> toolFunctionCallbacks, FunctionCallbackContext functionCallbackContext, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention) -
Uses of FunctionCallback in org.springframework.ai.autoconfigure.vertexai.gemini
Modifier and TypeMethodDescriptionVertexAiGeminiAutoConfiguration.vertexAiGeminiChat
(com.google.cloud.vertexai.VertexAI vertexAi, VertexAiGeminiChatProperties chatProperties, List<FunctionCallback> toolFunctionCallbacks, org.springframework.context.ApplicationContext context, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention) -
Uses of FunctionCallback in org.springframework.ai.autoconfigure.zhipuai
Modifier and TypeMethodDescriptionZhiPuAiAutoConfiguration.zhiPuAiChatModel
(ZhiPuAiConnectionProperties commonProperties, ZhiPuAiChatProperties chatProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.web.client.RestClient.Builder> restClientBuilderProvider, List<FunctionCallback> toolFunctionCallbacks, FunctionCallbackContext functionCallbackContext, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention) -
Uses of FunctionCallback in org.springframework.ai.azure.openai
Modifier and TypeMethodDescriptionvoid
AzureOpenAiChatOptions.setFunctionCallbacks
(List<FunctionCallback> functionCallbacks) AzureOpenAiChatOptions.Builder.withFunctionCallbacks
(List<FunctionCallback> functionCallbacks) ModifierConstructorDescriptionAzureOpenAiChatModel
(com.azure.ai.openai.OpenAIClientBuilder openAIClientBuilder, AzureOpenAiChatOptions options, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks) AzureOpenAiChatModel
(com.azure.ai.openai.OpenAIClientBuilder openAIClientBuilder, AzureOpenAiChatOptions options, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, io.micrometer.observation.ObservationRegistry observationRegistry) -
Uses of FunctionCallback in org.springframework.ai.bedrock.converse
Modifier and TypeMethodDescriptionBedrockProxyChatModel.Builder.withToolFunctionCallbacks
(List<FunctionCallback> toolFunctionCallbacks) ModifierConstructorDescriptionBedrockProxyChatModel
(software.amazon.awssdk.services.bedrockruntime.BedrockRuntimeClient bedrockRuntimeClient, software.amazon.awssdk.services.bedrockruntime.BedrockRuntimeAsyncClient bedrockRuntimeAsyncClient, FunctionCallingOptions defaultOptions, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, io.micrometer.observation.ObservationRegistry observationRegistry) -
Uses of FunctionCallback in org.springframework.ai.chat.client
Modifier and TypeMethodDescriptionDefaultChatClient.DefaultChatClientRequestSpec.getFunctionCallbacks()
Modifier and TypeMethodDescriptionChatClient.Builder.defaultFunctions
(FunctionCallback... functionCallbacks) DefaultChatClientBuilder.defaultFunctions
(FunctionCallback... functionCallbacks) ChatClient.ChatClientRequestSpec.functions
(FunctionCallback... functionCallbacks) DefaultChatClient.DefaultChatClientRequestSpec.functions
(FunctionCallback... functionCallbacks) ModifierConstructorDescriptionDefaultChatClientRequestSpec
(ChatModel chatModel, String userText, Map<String, Object> userParams, String systemText, Map<String, Object> systemParams, List<FunctionCallback> functionCallbacks, List<Message> messages, List<String> functionNames, List<Media> media, ChatOptions chatOptions, List<Advisor> advisors, Map<String, Object> advisorParams, io.micrometer.observation.ObservationRegistry observationRegistry, ChatClientObservationConvention customObservationConvention, Map<String, Object> toolContext) -
Uses of FunctionCallback in org.springframework.ai.chat.client.advisor.api
Modifier and TypeMethodDescriptionAdvisedRequest.functionCallbacks()
Returns the value of thefunctionCallbacks
record component.Modifier and TypeMethodDescriptionAdvisedRequest.Builder.withFunctionCallbacks
(List<FunctionCallback> functionCallbacks) Set the function callbacks. -
Uses of FunctionCallback in org.springframework.ai.chat.model
Modifier and TypeFieldDescriptionprotected final Map<String,
FunctionCallback> AbstractToolCallSupport.functionCallbackRegister
The function callback register is used to resolve the function callbacks by name.Modifier and TypeMethodDescriptionAbstractToolCallSupport.getFunctionCallbackRegister()
protected List<FunctionCallback>
AbstractToolCallSupport.resolveFunctionCallbacks
(Set<String> functionNames) Resolve the function callbacks by name.ModifierConstructorDescriptionprotected
AbstractToolCallSupport
(FunctionCallbackContext functionCallbackContext, FunctionCallingOptions functionCallingOptions, List<FunctionCallback> toolFunctionCallbacks) -
Uses of FunctionCallback in org.springframework.ai.minimax
Modifier and TypeMethodDescriptionvoid
MiniMaxChatOptions.setFunctionCallbacks
(List<FunctionCallback> functionCallbacks) MiniMaxChatOptions.Builder.withFunctionCallbacks
(List<FunctionCallback> functionCallbacks) ModifierConstructorDescriptionMiniMaxChatModel
(MiniMaxApi miniMaxApi, MiniMaxChatOptions options, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, org.springframework.retry.support.RetryTemplate retryTemplate, io.micrometer.observation.ObservationRegistry observationRegistry) Initializes a new instance of the MiniMaxChatModel. -
Uses of FunctionCallback in org.springframework.ai.mistralai
Modifier and TypeMethodDescriptionvoid
MistralAiChatOptions.setFunctionCallbacks
(List<FunctionCallback> functionCallbacks) MistralAiChatOptions.Builder.withFunctionCallbacks
(List<FunctionCallback> functionCallbacks) ModifierConstructorDescriptionMistralAiChatModel
(MistralAiApi mistralAiApi, MistralAiChatOptions options, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, org.springframework.retry.support.RetryTemplate retryTemplate) MistralAiChatModel
(MistralAiApi mistralAiApi, MistralAiChatOptions options, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, org.springframework.retry.support.RetryTemplate retryTemplate, io.micrometer.observation.ObservationRegistry observationRegistry) -
Uses of FunctionCallback in org.springframework.ai.model.function
Modifier and TypeClassDescriptionfinal class
Deprecated.static final record
Helper used to provide only the function definition, without the actual function call implementation.final class
Note that the underlying function is responsible for converting the output into format that can be consumed by the Model.class
AFunctionCallback
that invokes methods on objects via reflection, supporting: Static and non-static methods Any number of parameters (including none) Any parameter/return types (primitives, objects, collections) Special handling forToolContext
parameters Automatically infers the input parameters JSON schema from method's argument types.Modifier and TypeMethodDescriptionFunctionCallback.FunctionInvokingSpec.build()
Builds theFunctionCallback
instance.FunctionCallback.MethodInvokingSpec.build()
Builds theFunctionCallback
instance.FunctionCallbackContext.getFunctionCallback
(String beanName, String defaultDescription) Modifier and TypeMethodDescriptionFunctionCallingOptions.getFunctionCallbacks()
Function Callbacks to be registered with the ChatModel.FunctionCallingOptionsBuilder.PortableFunctionCallingOptions.getFunctionCallbacks()
Modifier and TypeMethodDescriptionFunctionCallingOptionsBuilder.withFunctionCallbacks
(FunctionCallback... functionCallbacks) Modifier and TypeMethodDescriptionvoid
FunctionCallingOptions.setFunctionCallbacks
(List<FunctionCallback> functionCallbacks) Set the Function Callbacks to be registered with the ChatModel.void
FunctionCallingOptionsBuilder.PortableFunctionCallingOptions.setFunctionCallbacks
(List<FunctionCallback> functionCallbacks) FunctionCallingOptionsBuilder.withFunctionCallbacks
(List<FunctionCallback> functionCallbacks) ModifierConstructorDescriptionFunctionCallingHelper
(FunctionCallbackContext functionCallbackContext, FunctionCallingOptions functionCallingOptions, List<FunctionCallback> toolFunctionCallbacks) -
Uses of FunctionCallback in org.springframework.ai.moonshot
Modifier and TypeMethodDescriptionvoid
MoonshotChatOptions.setFunctionCallbacks
(List<FunctionCallback> functionCallbacks) MoonshotChatOptions.Builder.withFunctionCallbacks
(List<FunctionCallback> functionCallbacks) ModifierConstructorDescriptionMoonshotChatModel
(MoonshotApi moonshotApi, MoonshotChatOptions options, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, org.springframework.retry.support.RetryTemplate retryTemplate, io.micrometer.observation.ObservationRegistry observationRegistry) Initializes a new instance of the MoonshotChatModel. -
Uses of FunctionCallback in org.springframework.ai.ollama
Modifier and TypeMethodDescriptionOllamaChatModel.Builder.withToolFunctionCallbacks
(List<FunctionCallback> toolFunctionCallbacks) ModifierConstructorDescriptionOllamaChatModel
(OllamaApi ollamaApi, OllamaOptions defaultOptions, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, io.micrometer.observation.ObservationRegistry observationRegistry, ModelManagementOptions modelManagementOptions) -
Uses of FunctionCallback in org.springframework.ai.ollama.api
Modifier and TypeMethodDescriptionvoid
OllamaOptions.setFunctionCallbacks
(List<FunctionCallback> functionCallbacks) OllamaOptions.withFunctionCallbacks
(List<FunctionCallback> functionCallbacks) -
Uses of FunctionCallback in org.springframework.ai.openai
Modifier and TypeMethodDescriptionvoid
OpenAiChatOptions.setFunctionCallbacks
(List<FunctionCallback> functionCallbacks) OpenAiChatOptions.Builder.withFunctionCallbacks
(List<FunctionCallback> functionCallbacks) ModifierConstructorDescriptionOpenAiChatModel
(OpenAiApi openAiApi, OpenAiChatOptions options, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, org.springframework.retry.support.RetryTemplate retryTemplate) Initializes a new instance of the OpenAiChatModel.OpenAiChatModel
(OpenAiApi openAiApi, OpenAiChatOptions options, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, org.springframework.retry.support.RetryTemplate retryTemplate, io.micrometer.observation.ObservationRegistry observationRegistry) Initializes a new instance of the OpenAiChatModel. -
Uses of FunctionCallback in org.springframework.ai.vertexai.gemini
Modifier and TypeMethodDescriptionvoid
VertexAiGeminiChatOptions.setFunctionCallbacks
(List<FunctionCallback> functionCallbacks) VertexAiGeminiChatOptions.Builder.withFunctionCallbacks
(List<FunctionCallback> functionCallbacks) ModifierConstructorDescriptionVertexAiGeminiChatModel
(com.google.cloud.vertexai.VertexAI vertexAI, VertexAiGeminiChatOptions options, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks) VertexAiGeminiChatModel
(com.google.cloud.vertexai.VertexAI vertexAI, VertexAiGeminiChatOptions options, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, org.springframework.retry.support.RetryTemplate retryTemplate) VertexAiGeminiChatModel
(com.google.cloud.vertexai.VertexAI vertexAI, VertexAiGeminiChatOptions options, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, org.springframework.retry.support.RetryTemplate retryTemplate, io.micrometer.observation.ObservationRegistry observationRegistry) -
Uses of FunctionCallback in org.springframework.ai.zhipuai
Modifier and TypeMethodDescriptionvoid
ZhiPuAiChatOptions.setFunctionCallbacks
(List<FunctionCallback> functionCallbacks) ZhiPuAiChatOptions.Builder.withFunctionCallbacks
(List<FunctionCallback> functionCallbacks) ModifierConstructorDescriptionZhiPuAiChatModel
(ZhiPuAiApi zhiPuAiApi, ZhiPuAiChatOptions options, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, org.springframework.retry.support.RetryTemplate retryTemplate, io.micrometer.observation.ObservationRegistry observationRegistry) Initializes a new instance of the ZhiPuAiChatModel.
FunctionCallbackWrapper.Builder