diff --git a/models/spring-ai-anthropic/src/main/java/org/springframework/ai/anthropic/AnthropicChatOptions.java b/models/spring-ai-anthropic/src/main/java/org/springframework/ai/anthropic/AnthropicChatOptions.java index 0389f3d445e..229b5113126 100644 --- a/models/spring-ai-anthropic/src/main/java/org/springframework/ai/anthropic/AnthropicChatOptions.java +++ b/models/spring-ai-anthropic/src/main/java/org/springframework/ai/anthropic/AnthropicChatOptions.java @@ -300,110 +300,6 @@ public Builder toolContext(Map toolContext) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - return model(model); - } - - /** - * @deprecated use {@link #model(AnthropicApi.ChatModel)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(AnthropicApi.ChatModel model) { - return model(model); - } - - /** - * @deprecated use {@link #maxTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokens(Integer maxTokens) { - return maxTokens(maxTokens); - } - - /** - * @deprecated use {@link #metadata(ChatCompletionRequest.Metadata)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMetadata(ChatCompletionRequest.Metadata metadata) { - return metadata(metadata); - } - - /** - * @deprecated use {@link #stopSequences(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStopSequences(List stopSequences) { - return stopSequences(stopSequences); - } - - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - return temperature(temperature); - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - return topP(topP); - } - - /** - * @deprecated use {@link #topK(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopK(Integer topK) { - return topK(topK); - } - - /** - * @deprecated use {@link #functionCallbacks(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctionCallbacks(List functionCallbacks) { - return functionCallbacks(functionCallbacks); - } - - /** - * @deprecated use {@link #functions(Set)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctions(Set functionNames) { - return functions(functionNames); - } - - /** - * @deprecated use {@link #function(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunction(String functionName) { - return function(functionName); - } - - /** - * @deprecated use {@link #proxyToolCalls(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withProxyToolCalls(Boolean proxyToolCalls) { - return proxyToolCalls(proxyToolCalls); - } - - /** - * @deprecated use {@link #toolContext(Map)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withToolContext(Map toolContext) { - return toolContext(toolContext); - } - public AnthropicChatOptions build() { return this.options; } diff --git a/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiAudioTranscriptionOptions.java b/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiAudioTranscriptionOptions.java index de32183855d..e6ce7592bf8 100644 --- a/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiAudioTranscriptionOptions.java +++ b/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiAudioTranscriptionOptions.java @@ -302,69 +302,6 @@ public Builder granularityType(List granularityType) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.model = model; - return this; - } - - /** - * @deprecated use {@link #deploymentName(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withDeploymentName(String deploymentName) { - this.options.setDeploymentName(deploymentName); - return this; - } - - /** - * @deprecated use {@link #language(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withLanguage(String language) { - this.options.language = language; - return this; - } - - /** - * @deprecated use {@link #prompt(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPrompt(String prompt) { - this.options.prompt = prompt; - return this; - } - - /** - * @deprecated use {@link #responseFormat(TranscriptResponseFormat)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withResponseFormat(TranscriptResponseFormat responseFormat) { - this.options.responseFormat = responseFormat; - return this; - } - - /** - * @deprecated use {@link #temperature(Float)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Float temperature) { - this.options.temperature = temperature; - return this; - } - - /** - * @deprecated use {@link #granularityType(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withGranularityType(List granularityType) { - this.options.granularityType = granularityType; - return this; - } - public AzureOpenAiAudioTranscriptionOptions build() { Assert.hasText(this.options.model, "model must not be empty"); Assert.notNull(this.options.responseFormat, "response_format must not be null"); diff --git a/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiChatOptions.java b/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiChatOptions.java index 837cb574f53..d34ca5dfbd1 100644 --- a/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiChatOptions.java +++ b/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiChatOptions.java @@ -555,203 +555,6 @@ public Builder streamOptions(ChatCompletionStreamOptions streamOptions) { return this; } - /** - * @deprecated use {@link #deploymentName(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withDeploymentName(String deploymentName) { - this.options.deploymentName = deploymentName; - return this; - } - - /** - * @deprecated use {@link #frequencyPenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFrequencyPenalty(Double frequencyPenalty) { - this.options.frequencyPenalty = frequencyPenalty; - return this; - } - - /** - * @deprecated use {@link #logitBias(Map)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withLogitBias(Map logitBias) { - this.options.logitBias = logitBias; - return this; - } - - /** - * @deprecated use {@link #maxTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokens(Integer maxTokens) { - this.options.maxTokens = maxTokens; - return this; - } - - /** - * @deprecated use {@link #N(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withN(Integer n) { - this.options.n = n; - return this; - } - - /** - * @deprecated use {@link #presencePenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPresencePenalty(Double presencePenalty) { - this.options.presencePenalty = presencePenalty; - return this; - } - - /** - * @deprecated use {@link #stop(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStop(List stop) { - this.options.stop = stop; - return this; - } - - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.options.temperature = temperature; - return this; - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.options.topP = topP; - return this; - } - - /** - * @deprecated use {@link #user(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withUser(String user) { - this.options.user = user; - return this; - } - - /** - * @deprecated use {@link #functionCallbacks(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctionCallbacks(List functionCallbacks) { - this.options.functionCallbacks = functionCallbacks; - return this; - } - - /** - * @deprecated use {@link #functions(Set)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctions(Set functionNames) { - Assert.notNull(functionNames, "Function names must not be null"); - this.options.functions = functionNames; - return this; - } - - /** - * @deprecated use {@link #function(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunction(String functionName) { - Assert.hasText(functionName, "Function name must not be empty"); - this.options.functions.add(functionName); - return this; - } - - /** - * @deprecated use {@link #responseFormat(AzureOpenAiResponseFormat)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withResponseFormat(AzureOpenAiResponseFormat responseFormat) { - this.options.responseFormat = responseFormat; - return this; - } - - /** - * @deprecated use {@link #proxyToolCalls(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withProxyToolCalls(Boolean proxyToolCalls) { - this.options.proxyToolCalls = proxyToolCalls; - return this; - } - - /** - * @deprecated use {@link #seed(Long)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSeed(Long seed) { - this.options.seed = seed; - return this; - } - - /** - * @deprecated use {@link #logprobs(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withLogprobs(Boolean logprobs) { - this.options.logprobs = logprobs; - return this; - } - - /** - * @deprecated use {@link #topLogprobs(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopLogprobs(Integer topLogprobs) { - this.options.topLogProbs = topLogprobs; - return this; - } - - /** - * @deprecated use {@link #enhancements(AzureChatEnhancementConfiguration)} )} - * instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withEnhancements(AzureChatEnhancementConfiguration enhancements) { - this.options.enhancements = enhancements; - return this; - } - - /** - * @deprecated use {@link #toolContext(Map)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withToolContext(Map toolContext) { - if (this.options.toolContext == null) { - this.options.toolContext = toolContext; - } - else { - this.options.toolContext.putAll(toolContext); - } - return this; - } - - /** - * @deprecated use {@link #streamOptions(ChatCompletionStreamOptions)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStreamOptions(ChatCompletionStreamOptions streamOptions) { - this.options.streamOptions = streamOptions; - return this; - } - public AzureOpenAiChatOptions build() { return this.options; } diff --git a/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiEmbeddingOptions.java b/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiEmbeddingOptions.java index 8d0460c8414..52431f13bb2 100644 --- a/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiEmbeddingOptions.java +++ b/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiEmbeddingOptions.java @@ -177,42 +177,6 @@ public Builder dimensions(Integer dimensions) { return this; } - /** - * @deprecated use {@link #user(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withUser(String user) { - this.options.setUser(user); - return this; - } - - /** - * @deprecated use {@link #deploymentName(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withDeploymentName(String model) { - this.options.setDeploymentName(model); - return this; - } - - /** - * @deprecated use {@link #inputType(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withInputType(String inputType) { - this.options.inputType = inputType; - return this; - } - - /** - * @deprecated use {@link #dimensions(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withDimensions(Integer dimensions) { - this.options.dimensions = dimensions; - return this; - } - public AzureOpenAiEmbeddingOptions build() { return this.options; } diff --git a/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiImageOptions.java b/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiImageOptions.java index 49f14bafbf9..a9616458aca 100644 --- a/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiImageOptions.java +++ b/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiImageOptions.java @@ -304,78 +304,6 @@ public Builder style(String style) { return this; } - /** - * @deprecated use {@link #N(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withN(Integer n) { - this.options.setN(n); - return this; - } - - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.setModel(model); - return this; - } - - /** - * @deprecated use {@link #deploymentName(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withDeploymentName(String deploymentName) { - this.options.setDeploymentName(deploymentName); - return this; - } - - /** - * @deprecated use {@link #responseFormat(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withResponseFormat(String responseFormat) { - this.options.setResponseFormat(responseFormat); - return this; - } - - /** - * @deprecated use {@link #width(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withWidth(Integer width) { - this.options.setWidth(width); - return this; - } - - /** - * @deprecated use {@link #height(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withHeight(Integer height) { - this.options.setHeight(height); - return this; - } - - /** - * @deprecated use {@link #user(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withUser(String user) { - this.options.setUser(user); - return this; - } - - /** - * @deprecated use {@link #style(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStyle(String style) { - this.options.setStyle(style); - return this; - } - public AzureOpenAiImageOptions build() { return this.options; } diff --git a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic/AnthropicChatOptions.java b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic/AnthropicChatOptions.java index 1bc32acc4aa..acccf0caeb5 100644 --- a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic/AnthropicChatOptions.java +++ b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic/AnthropicChatOptions.java @@ -208,60 +208,6 @@ public Builder anthropicVersion(String anthropicVersion) { return this; } - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.options.setTemperature(temperature); - return this; - } - - /** - * @deprecated use {@link #maxTokensToSample(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokensToSample(Integer maxTokensToSample) { - this.options.setMaxTokensToSample(maxTokensToSample); - return this; - } - - /** - * @deprecated use {@link #topK(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopK(Integer topK) { - this.options.setTopK(topK); - return this; - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.options.setTopP(topP); - return this; - } - - /** - * @deprecated use {@link #stopSequences(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStopSequences(List stopSequences) { - this.options.setStopSequences(stopSequences); - return this; - } - - /** - * @deprecated use {@link #anthropicVersion(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withAnthropicVersion(String anthropicVersion) { - this.options.setAnthropicVersion(anthropicVersion); - return this; - } - public AnthropicChatOptions build() { return this.options; } diff --git a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic/api/AnthropicChatBedrockApi.java b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic/api/AnthropicChatBedrockApi.java index 1c7a98cd183..afaa6c39d4b 100644 --- a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic/api/AnthropicChatBedrockApi.java +++ b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic/api/AnthropicChatBedrockApi.java @@ -246,60 +246,6 @@ public Builder anthropicVersion(String anthropicVersion) { return this; } - /** - * @deprecated use {@link #temperature( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.temperature = temperature; - return this; - } - - /** - * @deprecated use {@link #maxTokensToSample( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokensToSample(Integer maxTokensToSample) { - this.maxTokensToSample = maxTokensToSample; - return this; - } - - /** - * @deprecated use {@link #topK( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopK(Integer topK) { - this.topK = topK; - return this; - } - - /** - * @deprecated use {@link #topP( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double tpoP) { - this.topP = tpoP; - return this; - } - - /** - * @deprecated use {@link #stopSequences( List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStopSequences(List stopSequences) { - this.stopSequences = stopSequences; - return this; - } - - /** - * @deprecated use {@link #anthropicVersion( String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withAnthropicVersion(String anthropicVersion) { - this.anthropicVersion = anthropicVersion; - return this; - } - public AnthropicChatRequest build() { return new AnthropicChatRequest( this.prompt, diff --git a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic3/Anthropic3ChatOptions.java b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic3/Anthropic3ChatOptions.java index 2c271f4bf27..c0f1b65e7ac 100644 --- a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic3/Anthropic3ChatOptions.java +++ b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic3/Anthropic3ChatOptions.java @@ -311,60 +311,6 @@ public Builder anthropicVersion(String anthropicVersion) { return this; } - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.options.setTemperature(temperature); - return this; - } - - /** - * @deprecated use {@link #maxTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokens(Integer maxTokens) { - this.options.setMaxTokens(maxTokens); - return this; - } - - /** - * @deprecated use {@link #topK(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopK(Integer topK) { - this.options.setTopK(topK); - return this; - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.options.setTopP(topP); - return this; - } - - /** - * @deprecated use {@link #stopSequences(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStopSequences(List stopSequences) { - this.options.setStopSequences(stopSequences); - return this; - } - - /** - * @deprecated use {@link #anthropicVersion(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withAnthropicVersion(String anthropicVersion) { - this.options.setAnthropicVersion(anthropicVersion); - return this; - } - /** * Build the {@link Anthropic3ChatOptions}. * @return the {@link Anthropic3ChatOptions} diff --git a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic3/api/Anthropic3ChatBedrockApi.java b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic3/api/Anthropic3ChatBedrockApi.java index 9ac35caa443..43cb1050352 100644 --- a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic3/api/Anthropic3ChatBedrockApi.java +++ b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic3/api/Anthropic3ChatBedrockApi.java @@ -323,70 +323,6 @@ public Builder anthropicVersion(String anthropicVersion) { return this; } - /** - * @deprecated use {@link #system( String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSystem(String system) { - this.system = system; - return this; - } - - /** - * @deprecated use {@link #temperature( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.temperature = temperature; - return this; - } - - /** - * @deprecated use {@link #maxTokens( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokens(Integer maxTokens) { - this.maxTokens = maxTokens; - return this; - } - - /** - * @deprecated use {@link #topK( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopK(Integer topK) { - this.topK = topK; - return this; - } - - /** - * @deprecated use {@link #topP( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double tpoP) { - this.topP = tpoP; - return this; - } - - /** - * @deprecated use {@link #stopSequences( List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStopSequences(List stopSequences) { - this.stopSequences = stopSequences; - return this; - } - - /** - * @deprecated use {@link #anthropicVersion( String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withAnthropicVersion(String anthropicVersion) { - this.anthropicVersion = anthropicVersion; - return this; - } - - /** * Build the {@link AnthropicChatRequest}. * @return the {@link AnthropicChatRequest} diff --git a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/BedrockCohereChatOptions.java b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/BedrockCohereChatOptions.java index 0bec0913e84..cbde17d425b 100644 --- a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/BedrockCohereChatOptions.java +++ b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/BedrockCohereChatOptions.java @@ -260,87 +260,6 @@ public Builder truncate(Truncate truncate) { return this; } - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.options.setTemperature(temperature); - return this; - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.options.setTopP(topP); - return this; - } - - /** - * @deprecated use {@link #topK(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopK(Integer topK) { - this.options.setTopK(topK); - return this; - } - - /** - * @deprecated use {@link #maxTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokens(Integer maxTokens) { - this.options.setMaxTokens(maxTokens); - return this; - } - - /** - * @deprecated use {@link #stopSequences(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStopSequences(List stopSequences) { - this.options.setStopSequences(stopSequences); - return this; - } - - /** - * @deprecated use {@link #returnLikelihoods(ReturnLikelihoods)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withReturnLikelihoods(ReturnLikelihoods returnLikelihoods) { - this.options.setReturnLikelihoods(returnLikelihoods); - return this; - } - - /** - * @deprecated use {@link #numGenerations(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withNumGenerations(Integer numGenerations) { - this.options.setNumGenerations(numGenerations); - return this; - } - - /** - * @deprecated use {@link #logitBias(LogitBias)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withLogitBias(LogitBias logitBias) { - this.options.setLogitBias(logitBias); - return this; - } - - /** - * @deprecated use {@link #truncate(Truncate)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTruncate(Truncate truncate) { - this.options.setTruncate(truncate); - return this; - } - public BedrockCohereChatOptions build() { return this.options; } diff --git a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/BedrockCohereEmbeddingOptions.java b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/BedrockCohereEmbeddingOptions.java index c226fe12a9f..2013425c335 100644 --- a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/BedrockCohereEmbeddingOptions.java +++ b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/BedrockCohereEmbeddingOptions.java @@ -98,24 +98,6 @@ public Builder truncate(Truncate truncate) { return this; } - /** - * @deprecated use {@link #inputType(InputType)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withInputType(InputType inputType) { - this.options.setInputType(inputType); - return this; - } - - /** - * @deprecated use {@link #truncate(Truncate)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTruncate(Truncate truncate) { - this.options.setTruncate(truncate); - return this; - } - public BedrockCohereEmbeddingOptions build() { return this.options; } diff --git a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/api/CohereChatBedrockApi.java b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/api/CohereChatBedrockApi.java index c63c12b1835..4ae18f12bb7 100644 --- a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/api/CohereChatBedrockApi.java +++ b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/api/CohereChatBedrockApi.java @@ -319,96 +319,6 @@ public Builder truncate(Truncate truncate) { return this; } - /** - * @deprecated use {@link #temperature( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.temperature = temperature; - return this; - } - - /** - * @deprecated use {@link #topP( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.topP = topP; - return this; - } - - /** - * @deprecated use {@link #topK( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopK(Integer topK) { - this.topK = topK; - return this; - } - - /** - * @deprecated use {@link #maxTokens( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokens(Integer maxTokens) { - this.maxTokens = maxTokens; - return this; - } - - /** - * @deprecated use {@link #stopSequences( List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStopSequences(List stopSequences) { - this.stopSequences = stopSequences; - return this; - } - - /** - * @deprecated use {@link #returnLikelihoods( ReturnLikelihoods)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withReturnLikelihoods(ReturnLikelihoods returnLikelihoods) { - this.returnLikelihoods = returnLikelihoods; - return this; - } - - /** - * @deprecated use {@link #stream(boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStream(boolean stream) { - this.stream = stream; - return this; - } - - /** - * @deprecated use {@link #numGenerations( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withNumGenerations(Integer numGenerations) { - this.numGenerations = numGenerations; - return this; - } - - /** - * @deprecated use {@link #logitBias( LogitBias)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withLogitBias(LogitBias logitBias) { - this.logitBias = logitBias; - return this; - } - - /** - * @deprecated use {@link #truncate( Truncate)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTruncate(Truncate truncate) { - this.truncate = truncate; - return this; - } - public CohereChatRequest build() { return new CohereChatRequest( this.prompt, diff --git a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/jurassic2/BedrockAi21Jurassic2ChatOptions.java b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/jurassic2/BedrockAi21Jurassic2ChatOptions.java index 8775e21cde6..2784ac2a4fa 100644 --- a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/jurassic2/BedrockAi21Jurassic2ChatOptions.java +++ b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/jurassic2/BedrockAi21Jurassic2ChatOptions.java @@ -401,105 +401,6 @@ public Builder countPenaltyOptions(BedrockAi21Jurassic2ChatOptions.Penalty count return this; } - /** - * @deprecated use {@link #prompt(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPrompt(String prompt) { - this.request.setPrompt(prompt); - return this; - } - - /** - * @deprecated use {@link #numResults(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withNumResults(Integer numResults) { - this.request.setNumResults(numResults); - return this; - } - - /** - * @deprecated use {@link #maxTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokens(Integer maxTokens) { - this.request.setMaxTokens(maxTokens); - return this; - } - - /** - * @deprecated use {@link #minTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMinTokens(Integer minTokens) { - this.request.setMinTokens(minTokens); - return this; - } - - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.request.setTemperature(temperature); - return this; - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.request.setTopP(topP); - return this; - } - - /** - * @deprecated use {@link #stopSequences(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStopSequences(List stopSequences) { - this.request.setStopSequences(stopSequences); - return this; - } - - /** - * @deprecated use {@link #topK(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopK(Integer topKReturn) { - this.request.setTopK(topKReturn); - return this; - } - - /** - * @deprecated use {@link #frequencyPenaltyOptions(Penalty)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFrequencyPenaltyOptions(BedrockAi21Jurassic2ChatOptions.Penalty frequencyPenalty) { - this.request.setFrequencyPenaltyOptions(frequencyPenalty); - return this; - } - - /** - * @deprecated use {@link #presencePenaltyOptions(Penalty)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPresencePenaltyOptions(BedrockAi21Jurassic2ChatOptions.Penalty presencePenalty) { - this.request.setPresencePenaltyOptions(presencePenalty); - return this; - } - - /** - * @deprecated use {@link #countPenaltyOptions(Penalty)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withCountPenaltyOptions(BedrockAi21Jurassic2ChatOptions.Penalty countPenalty) { - this.request.setCountPenaltyOptions(countPenalty); - return this; - } - public BedrockAi21Jurassic2ChatOptions build() { return this.request; } diff --git a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/jurassic2/api/Ai21Jurassic2ChatBedrockApi.java b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/jurassic2/api/Ai21Jurassic2ChatBedrockApi.java index 5fc48bf737f..bcd5c837192 100644 --- a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/jurassic2/api/Ai21Jurassic2ChatBedrockApi.java +++ b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/jurassic2/api/Ai21Jurassic2ChatBedrockApi.java @@ -333,69 +333,6 @@ public Builder frequencyPenalty(IntegerScalePenalty frequencyPenalty) { return this; } - /** - * @deprecated Use {@link #temperature( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.temperature = temperature; - return this; - } - - /** - * @deprecated Use {@link #topP( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.topP = topP; - return this; - } - - /** - * @deprecated Use {@link #maxTokens( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokens(Integer maxTokens) { - this.maxTokens = maxTokens; - return this; - } - - /** - * @deprecated Use {@link #stopSequences( List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStopSequences(List stopSequences) { - this.stopSequences = stopSequences; - return this; - } - - /** - * @deprecated Use {@link #countPenalty( IntegerScalePenalty)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withCountPenalty(IntegerScalePenalty countPenalty) { - this.countPenalty = countPenalty; - return this; - } - - /** - * @deprecated Use {@link #presencePenalty( FloatScalePenalty)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPresencePenalty(FloatScalePenalty presencePenalty) { - this.presencePenalty = presencePenalty; - return this; - } - - /** - * @deprecated Use {@link #frequencyPenalty( IntegerScalePenalty)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFrequencyPenalty(IntegerScalePenalty frequencyPenalty) { - this.frequencyPenalty = frequencyPenalty; - return this; - } - /** * Build the {@link Ai21Jurassic2ChatRequest} instance. * @return a new {@link Ai21Jurassic2ChatRequest} instance diff --git a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/llama/BedrockLlamaChatOptions.java b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/llama/BedrockLlamaChatOptions.java index 9247571c09a..9bb97a34d7b 100644 --- a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/llama/BedrockLlamaChatOptions.java +++ b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/llama/BedrockLlamaChatOptions.java @@ -154,33 +154,6 @@ public Builder maxGenLen(Integer maxGenLen) { return this; } - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.options.setTemperature(temperature); - return this; - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.options.setTopP(topP); - return this; - } - - /** - * @deprecated use {@link #maxGenLen(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxGenLen(Integer maxGenLen) { - this.options.setMaxGenLen(maxGenLen); - return this; - } - public BedrockLlamaChatOptions build() { return this.options; } diff --git a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/llama/api/LlamaChatBedrockApi.java b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/llama/api/LlamaChatBedrockApi.java index 972413de9b4..e6e5f194ad8 100644 --- a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/llama/api/LlamaChatBedrockApi.java +++ b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/llama/api/LlamaChatBedrockApi.java @@ -251,33 +251,6 @@ public Builder maxGenLen(Integer maxGenLen) { return this; } - /** - * @deprecated use {@link #temperature( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.temperature = temperature; - return this; - } - - /** - * @deprecated use {@link #topP( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.topP = topP; - return this; - } - - /** - * @deprecated use {@link #maxGenLen( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxGenLen(Integer maxGenLen) { - this.maxGenLen = maxGenLen; - return this; - } - public LlamaChatRequest build() { return new LlamaChatRequest( this.prompt, diff --git a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/titan/api/TitanChatBedrockApi.java b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/titan/api/TitanChatBedrockApi.java index 5c78261d3cd..0519cfde7c6 100644 --- a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/titan/api/TitanChatBedrockApi.java +++ b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/titan/api/TitanChatBedrockApi.java @@ -232,42 +232,6 @@ public Builder stopSequences(List stopSequences) { return this; } - /** - * @deprecated use {@link #temperature( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.temperature = temperature; - return this; - } - - /** - * @deprecated use {@link #topP( Double)} ( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.topP = topP; - return this; - } - - /** - * @deprecated use {@link #maxTokenCount( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokenCount(Integer maxTokenCount) { - this.maxTokenCount = maxTokenCount; - return this; - } - - /** - * @deprecated use {@link #stopSequences( List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStopSequences(List stopSequences) { - this.stopSequences = stopSequences; - return this; - } - public TitanChatRequest build() { if (this.temperature == null && this.topP == null && this.maxTokenCount == null diff --git a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/titan/api/TitanEmbeddingBedrockApi.java b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/titan/api/TitanEmbeddingBedrockApi.java index c7f3c440958..a96455a5b72 100644 --- a/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/titan/api/TitanEmbeddingBedrockApi.java +++ b/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/titan/api/TitanEmbeddingBedrockApi.java @@ -153,25 +153,6 @@ public Builder inputImage(String inputImage) { return this; } - /** - * @deprecated use {@link #inputText( String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withInputText(String inputText) { - this.inputText = inputText; - return this; - } - - /** - * @deprecated use {@link #inputImage( String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withInputImage(String inputImage) { - this.inputImage = inputImage; - return this; - } - - public TitanEmbeddingRequest build() { Assert.isTrue(this.inputText != null || this.inputImage != null, "At least one of the inputText or inputImage parameters must be provided!"); diff --git a/models/spring-ai-minimax/src/main/java/org/springframework/ai/minimax/MiniMaxChatOptions.java b/models/spring-ai-minimax/src/main/java/org/springframework/ai/minimax/MiniMaxChatOptions.java index eceaa6ec7c9..244c1fce699 100644 --- a/models/spring-ai-minimax/src/main/java/org/springframework/ai/minimax/MiniMaxChatOptions.java +++ b/models/spring-ai-minimax/src/main/java/org/springframework/ai/minimax/MiniMaxChatOptions.java @@ -613,177 +613,6 @@ public Builder toolContext(Map toolContext) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.model = model; - return this; - } - - /** - * @deprecated use {@link #frequencyPenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFrequencyPenalty(Double frequencyPenalty) { - this.options.frequencyPenalty = frequencyPenalty; - return this; - } - - /** - * @deprecated use {@link #maxTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokens(Integer maxTokens) { - this.options.maxTokens = maxTokens; - return this; - } - - /** - * @deprecated use {@link #N(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withN(Integer n) { - this.options.n = n; - return this; - } - - /** - * @deprecated use {@link #presencePenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPresencePenalty(Double presencePenalty) { - this.options.presencePenalty = presencePenalty; - return this; - } - - /** - * @deprecated use - * {@link #responseFormat(MiniMaxApi.ChatCompletionRequest.ResponseFormat)} - * instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withResponseFormat(MiniMaxApi.ChatCompletionRequest.ResponseFormat responseFormat) { - this.options.responseFormat = responseFormat; - return this; - } - - /** - * @deprecated use {@link #seed(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSeed(Integer seed) { - this.options.seed = seed; - return this; - } - - /** - * @deprecated use {@link #stop(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStop(List stop) { - this.options.stop = stop; - return this; - } - - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.options.temperature = temperature; - return this; - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.options.topP = topP; - return this; - } - - /** - * @deprecated use {@link #maskSensitiveInfo(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaskSensitiveInfo(Boolean maskSensitiveInfo) { - this.options.maskSensitiveInfo = maskSensitiveInfo; - return this; - } - - /** - * @deprecated use {@link #tools(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTools(List tools) { - this.options.tools = tools; - return this; - } - - /** - * @deprecated use {@link #toolChoice(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withToolChoice(String toolChoice) { - this.options.toolChoice = toolChoice; - return this; - } - - /** - * @deprecated use {@link #functionCallbacks(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctionCallbacks(List functionCallbacks) { - this.options.functionCallbacks = functionCallbacks; - return this; - } - - /** - * @deprecated use {@link #functions(Set)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctions(Set functionNames) { - Assert.notNull(functionNames, "Function names must not be null"); - this.options.functions = functionNames; - return this; - } - - /** - * @deprecated use {@link #function(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunction(String functionName) { - Assert.hasText(functionName, "Function name must not be empty"); - this.options.functions.add(functionName); - return this; - } - - /** - * @deprecated use {@link #proxyToolCalls(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withProxyToolCalls(Boolean proxyToolCalls) { - this.options.proxyToolCalls = proxyToolCalls; - return this; - } - - /** - * @deprecated use {@link #toolContext(Map)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withToolContext(Map toolContext) { - if (this.options.toolContext == null) { - this.options.toolContext = toolContext; - } - else { - this.options.toolContext.putAll(toolContext); - } - return this; - } - public MiniMaxChatOptions build() { return this.options; } diff --git a/models/spring-ai-minimax/src/main/java/org/springframework/ai/minimax/MiniMaxEmbeddingOptions.java b/models/spring-ai-minimax/src/main/java/org/springframework/ai/minimax/MiniMaxEmbeddingOptions.java index 9c084d6def0..2fe66ea3483 100644 --- a/models/spring-ai-minimax/src/main/java/org/springframework/ai/minimax/MiniMaxEmbeddingOptions.java +++ b/models/spring-ai-minimax/src/main/java/org/springframework/ai/minimax/MiniMaxEmbeddingOptions.java @@ -72,15 +72,6 @@ public Builder model(String model) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.setModel(model); - return this; - } - public MiniMaxEmbeddingOptions build() { return this.options; } diff --git a/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/MistralAiChatOptions.java b/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/MistralAiChatOptions.java index 0de3f71a0da..2524836e001 100644 --- a/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/MistralAiChatOptions.java +++ b/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/MistralAiChatOptions.java @@ -445,134 +445,6 @@ public Builder toolContext(Map toolContext) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - return model(model); - } - - /** - * @deprecated use {@link #model(MistralAiApi.ChatModel)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(MistralAiApi.ChatModel chatModel) { - return model(chatModel); - } - - /** - * @deprecated use {@link #maxTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokens(Integer maxTokens) { - return maxTokens(maxTokens); - } - - /** - * @deprecated use {@link #safePrompt(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSafePrompt(Boolean safePrompt) { - return safePrompt(safePrompt); - } - - /** - * @deprecated use {@link #randomSeed(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withRandomSeed(Integer randomSeed) { - return randomSeed(randomSeed); - } - - /** - * @deprecated use {@link #stop(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStop(List stop) { - return stop(stop); - } - - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - return temperature(temperature); - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - return topP(topP); - } - - /** - * @deprecated use {@link #responseFormat(ResponseFormat)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withResponseFormat(ResponseFormat responseFormat) { - return responseFormat(responseFormat); - } - - /** - * @deprecated use {@link #tools(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTools(List tools) { - return tools(tools); - } - - /** - * @deprecated use {@link #toolChoice(ToolChoice)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withToolChoice(ToolChoice toolChoice) { - return toolChoice(toolChoice); - } - - /** - * @deprecated use {@link #functionCallbacks(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctionCallbacks(List functionCallbacks) { - return functionCallbacks(functionCallbacks); - } - - /** - * @deprecated use {@link #functions(Set)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctions(Set functionNames) { - return functions(functionNames); - } - - /** - * @deprecated use {@link #function(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunction(String functionName) { - return function(functionName); - } - - /** - * @deprecated use {@link #proxyToolCalls(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withProxyToolCalls(Boolean proxyToolCalls) { - return proxyToolCalls(proxyToolCalls); - } - - /** - * @deprecated use {@link #toolContext(Map)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withToolContext(Map toolContext) { - return toolContext(toolContext); - } - public MistralAiChatOptions build() { return this.options; } diff --git a/models/spring-ai-moonshot/src/main/java/org/springframework/ai/moonshot/MoonshotChatOptions.java b/models/spring-ai-moonshot/src/main/java/org/springframework/ai/moonshot/MoonshotChatOptions.java index ccdbf44ab64..3efddaf89c3 100644 --- a/models/spring-ai-moonshot/src/main/java/org/springframework/ai/moonshot/MoonshotChatOptions.java +++ b/models/spring-ai-moonshot/src/main/java/org/springframework/ai/moonshot/MoonshotChatOptions.java @@ -509,134 +509,6 @@ public Builder toolContext(Map toolContext) { return this; } - /** - * @deprecated use {@link #functions(Set)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctions(Set functionNames) { - return functions(functionNames); - } - - /** - * @deprecated use {@link #function(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunction(String functionName) { - return function(functionName); - } - - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - return model(model); - } - - /** - * @deprecated use {@link #maxTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokens(Integer maxTokens) { - return maxTokens(maxTokens); - } - - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - return temperature(temperature); - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - return topP(topP); - } - - /** - * @deprecated use {@link #N(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withN(Integer n) { - return N(n); - } - - /** - * @deprecated use {@link #presencePenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPresencePenalty(Double presencePenalty) { - return presencePenalty(presencePenalty); - } - - /** - * @deprecated use {@link #frequencyPenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFrequencyPenalty(Double frequencyPenalty) { - return frequencyPenalty(frequencyPenalty); - } - - /** - * @deprecated use {@link #stop(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStop(List stop) { - return stop(stop); - } - - /** - * @deprecated use {@link #user(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withUser(String user) { - return user(user); - } - - /** - * @deprecated use {@link #tools(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTools(List tools) { - return tools(tools); - } - - /** - * @deprecated use {@link #toolChoice(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withToolChoice(String toolChoice) { - return toolChoice(toolChoice); - } - - /** - * @deprecated use {@link #functionCallbacks(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctionCallbacks(List functionCallbacks) { - return functionCallbacks(functionCallbacks); - } - - /** - * @deprecated use {@link #proxyToolCalls(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withProxyToolCalls(Boolean proxyToolCalls) { - return proxyToolCalls(proxyToolCalls); - } - - /** - * @deprecated use {@link #toolContext(Map)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withToolContext(Map toolContext) { - return toolContext(toolContext); - } - public MoonshotChatOptions build() { return this.options; } diff --git a/models/spring-ai-oci-genai/src/main/java/org/springframework/ai/oci/OCIEmbeddingOptions.java b/models/spring-ai-oci-genai/src/main/java/org/springframework/ai/oci/OCIEmbeddingOptions.java index 12deaade45a..73fda2500fe 100644 --- a/models/spring-ai-oci-genai/src/main/java/org/springframework/ai/oci/OCIEmbeddingOptions.java +++ b/models/spring-ai-oci-genai/src/main/java/org/springframework/ai/oci/OCIEmbeddingOptions.java @@ -108,42 +108,6 @@ public Builder truncate(EmbedTextDetails.Truncate truncate) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.setModel(model); - return this; - } - - /** - * @deprecated use {@link #compartment(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withCompartment(String compartment) { - this.options.setCompartment(compartment); - return this; - } - - /** - * @deprecated use {@link #servingMode(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withServingMode(String servingMode) { - this.options.setServingMode(servingMode); - return this; - } - - /** - * @deprecated use {@link #truncate(EmbedTextDetails.Truncate)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTruncate(EmbedTextDetails.Truncate truncate) { - this.options.truncate = truncate; - return this; - } - public OCIEmbeddingOptions build() { return this.options; } diff --git a/models/spring-ai-oci-genai/src/main/java/org/springframework/ai/oci/cohere/OCICohereChatOptions.java b/models/spring-ai-oci-genai/src/main/java/org/springframework/ai/oci/cohere/OCICohereChatOptions.java index 9b7d98b510e..afd17ab456f 100644 --- a/models/spring-ai-oci-genai/src/main/java/org/springframework/ai/oci/cohere/OCICohereChatOptions.java +++ b/models/spring-ai-oci-genai/src/main/java/org/springframework/ai/oci/cohere/OCICohereChatOptions.java @@ -338,123 +338,6 @@ public Builder tools(List tools) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.chatOptions.model = model; - return this; - } - - /** - * @deprecated use {@link #maxTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokens(Integer maxTokens) { - this.chatOptions.maxTokens = maxTokens; - return this; - } - - /** - * @deprecated use {@link #compartment(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withCompartment(String compartment) { - this.chatOptions.compartment = compartment; - return this; - } - - /** - * @deprecated use {@link #servingMode(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withServingMode(String servingMode) { - this.chatOptions.servingMode = servingMode; - return this; - } - - /** - * @deprecated use {@link #preambleOverride(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPreambleOverride(String preambleOverride) { - this.chatOptions.preambleOverride = preambleOverride; - return this; - } - - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.chatOptions.temperature = temperature; - return this; - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.chatOptions.topP = topP; - return this; - } - - /** - * @deprecated use {@link #topK(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopK(Integer topK) { - this.chatOptions.topK = topK; - return this; - } - - /** - * @deprecated use {@link #frequencyPenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFrequencyPenalty(Double frequencyPenalty) { - this.chatOptions.frequencyPenalty = frequencyPenalty; - return this; - } - - /** - * @deprecated use {@link #presencePenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPresencePenalty(Double presencePenalty) { - this.chatOptions.presencePenalty = presencePenalty; - return this; - } - - /** - * @deprecated use {@link #stop(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStop(List stop) { - this.chatOptions.stop = stop; - return this; - } - - /** - * @deprecated use {@link #documents(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withDocuments(List documents) { - this.chatOptions.documents = documents; - return this; - } - - /** - * @deprecated use {@link #tools(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTools(List tools) { - this.chatOptions.tools = tools; - return this; - } - public OCICohereChatOptions build() { return this.chatOptions; } diff --git a/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/OllamaChatModel.java b/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/OllamaChatModel.java index 9271cbbf5c3..9057100cd27 100644 --- a/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/OllamaChatModel.java +++ b/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/OllamaChatModel.java @@ -484,16 +484,6 @@ public Builder defaultOptions(OllamaOptions defaultOptions) { return this; } - /** - * @deprecated use the {@link #functionCallbackResolver(FunctionCallbackResolver)} - * instead - */ - @Deprecated - public Builder withFunctionCallbackContext(FunctionCallbackResolver functionCallbackContext) { - this.functionCallbackResolver = functionCallbackContext; - return this; - } - public Builder functionCallbackResolver(FunctionCallbackResolver functionCallbackResolver) { this.functionCallbackResolver = functionCallbackResolver; return this; @@ -514,52 +504,6 @@ public Builder modelManagementOptions(ModelManagementOptions modelManagementOpti return this; } - /** - * @deprecated use {@link #ollamaApi(OllamaApi)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withOllamaApi(OllamaApi ollamaApi) { - this.ollamaApi = ollamaApi; - return this; - } - - /** - * @deprecated use {@link #defaultOptions(OllamaOptions)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withDefaultOptions(OllamaOptions defaultOptions) { - this.defaultOptions = defaultOptions; - return this; - } - - /** - * @deprecated use {@link #toolFunctionCallbacks(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withToolFunctionCallbacks(List toolFunctionCallbacks) { - this.toolFunctionCallbacks = toolFunctionCallbacks; - return this; - } - - /** - * @deprecated use {@link #observationRegistry(ObservationRegistry)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withObservationRegistry(ObservationRegistry observationRegistry) { - this.observationRegistry = observationRegistry; - return this; - } - - /** - * @deprecated use {@link #modelManagementOptions(ModelManagementOptions)} - * instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModelManagementOptions(ModelManagementOptions modelManagementOptions) { - this.modelManagementOptions = modelManagementOptions; - return this; - } - public OllamaChatModel build() { return new OllamaChatModel(this.ollamaApi, this.defaultOptions, this.functionCallbackResolver, this.toolFunctionCallbacks, this.observationRegistry, this.modelManagementOptions); diff --git a/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/OllamaEmbeddingModel.java b/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/OllamaEmbeddingModel.java index 4ec62e88a4a..4eacc06cf81 100644 --- a/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/OllamaEmbeddingModel.java +++ b/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/OllamaEmbeddingModel.java @@ -247,43 +247,6 @@ public Builder modelManagementOptions(ModelManagementOptions modelManagementOpti return this; } - /** - * @deprecated use {@link #ollamaApi(OllamaApi)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withOllamaApi(OllamaApi ollamaApi) { - this.ollamaApi = ollamaApi; - return this; - } - - /** - * @deprecated use {@link #defaultOptions(OllamaOptions)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withDefaultOptions(OllamaOptions defaultOptions) { - this.defaultOptions = defaultOptions; - return this; - } - - /** - * @deprecated use {@link #observationRegistry(ObservationRegistry)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withObservationRegistry(ObservationRegistry observationRegistry) { - this.observationRegistry = observationRegistry; - return this; - } - - /** - * @deprecated use {@link #modelManagementOptions(ModelManagementOptions)} - * instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModelManagementOptions(ModelManagementOptions modelManagementOptions) { - this.modelManagementOptions = modelManagementOptions; - return this; - } - public OllamaEmbeddingModel build() { return new OllamaEmbeddingModel(this.ollamaApi, this.defaultOptions, this.observationRegistry, this.modelManagementOptions); diff --git a/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaApi.java b/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaApi.java index ba1d8db14ee..1a238b5d890 100644 --- a/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaApi.java +++ b/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaApi.java @@ -362,43 +362,16 @@ public Builder(Role role) { this.role = role; } - /** - * @deprecated Use {@link #content(String)} instead. - */ - @Deprecated - public Builder withContent(String content) { - this.content = content; - return this; - } - public Builder content(String content) { this.content = content; return this; } - /** - * @deprecated Use {@link #images(List)} instead. - */ - @Deprecated - public Builder withImages(List images) { - this.images = images; - return this; - } - public Builder images(List images) { this.images = images; return this; } - /** - * @deprecated Use {@link #toolCalls(List)} instead. - */ - @Deprecated - public Builder withToolCalls(List toolCalls) { - this.toolCalls = toolCalls; - return this; - } - public Builder toolCalls(List toolCalls) { this.toolCalls = toolCalls; return this; @@ -553,72 +526,6 @@ public Builder options(OllamaOptions options) { return this; } - /** - * @deprecated use {@link #messages( List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMessages(List messages) { - this.messages = messages; - return this; - } - - /** - * @deprecated use {@link #stream(boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStream(boolean stream) { - this.stream = stream; - return this; - } - - /** - * @deprecated use {@link #format( String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFormat(Object format) { - this.format = format; - return this; - } - - /** - * @deprecated use {@link #keepAlive( String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withKeepAlive(String keepAlive) { - this.keepAlive = keepAlive; - return this; - } - - /** - * @deprecated use {@link #tools( List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTools(List tools) { - this.tools = tools; - return this; - } - - /** - * @deprecated use {@link #options( Map)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withOptions(Map options) { - Objects.requireNonNull(options, "The options can not be null."); - - this.options = OllamaOptions.filterNonSupportedFields(options); - return this; - } - - /** - * @deprecated use {@link #options( OllamaOptions)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withOptions(OllamaOptions options) { - Objects.requireNonNull(options, "The options can not be null."); - this.options = OllamaOptions.filterNonSupportedFields(options.toMap()); - return this; - } - public ChatRequest build() { return new ChatRequest(this.model, this.messages, this.stream, this.format, this.keepAlive, this.tools, this.options); } diff --git a/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaOptions.java b/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaOptions.java index 0f8485c8eaa..dcc8cc50be4 100644 --- a/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaOptions.java +++ b/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaOptions.java @@ -335,17 +335,6 @@ public static Builder builder() { return new Builder(); } - - /** - * Helper factory method to create a new {@link OllamaOptions} instance. - * @return A new {@link OllamaOptions} instance. - * @deprecated Use {@link OllamaOptions#builder()} instead - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public static OllamaOptions create() { - return new OllamaOptions(); - } - /** * Filter out the non-supported fields from the options. * @param options The options to filter. @@ -398,375 +387,6 @@ public static OllamaOptions fromOptions(OllamaOptions fromOptions) { .toolContext(fromOptions.getToolContext()).build(); } - /** - * @deprecated Use {@link Builder#build()} instead - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions build() { - return this; - } - - - - - - /** - * @deprecated use {@link Builder#model( String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withModel(String model) { - this.model = model; - return this; - } - - /** - * @deprecated use {@link Builder#model( OllamaModel)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withModel(OllamaModel model) { - this.model = model.getName(); - return this; - } - - /** - * @deprecated use {@link Builder#format} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withFormat(Object format) { - this.format = format; - return this; - } - - /** - * @deprecated use {@link Builder#keepAlive} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withKeepAlive(String keepAlive) { - this.keepAlive = keepAlive; - return this; - } - - /** - * @deprecated use {@link Builder#truncate( Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withTruncate(Boolean truncate) { - this.truncate = truncate; - return this; - } - - /** - * @deprecated use {@link Builder#useNUMA( Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withUseNUMA(Boolean useNUMA) { - this.useNUMA = useNUMA; - return this; - } - - /** - * @deprecated use {@link Builder#numCtx( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withNumCtx(Integer numCtx) { - this.numCtx = numCtx; - return this; - } - - /** - * @deprecated use {@link Builder#numBatch( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withNumBatch(Integer numBatch) { - this.numBatch = numBatch; - return this; - } - - /** - * @deprecated use {@link Builder#numGPU( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withNumGPU(Integer numGPU) { - this.numGPU = numGPU; - return this; - } - - /** - * @deprecated use {@link Builder#mainGPU( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withMainGPU(Integer mainGPU) { - this.mainGPU = mainGPU; - return this; - } - - /** - * @deprecated use {@link Builder#lowVRAM( Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withLowVRAM(Boolean lowVRAM) { - this.lowVRAM = lowVRAM; - return this; - } - - /** - * @deprecated use {@link Builder#f16KV( Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withF16KV(Boolean f16KV) { - this.f16KV = f16KV; - return this; - } - - /** - * @deprecated use {@link Builder#logitsAll( Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withLogitsAll(Boolean logitsAll) { - this.logitsAll = logitsAll; - return this; - } - - /** - * @deprecated use {@link Builder#vocabOnly( Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withVocabOnly(Boolean vocabOnly) { - this.vocabOnly = vocabOnly; - return this; - } - - /** - * @deprecated use {@link Builder#useMMap( Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withUseMMap(Boolean useMMap) { - this.useMMap = useMMap; - return this; - } - - /** - * @deprecated use {@link Builder#useMLock( Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withUseMLock(Boolean useMLock) { - this.useMLock = useMLock; - return this; - } - - /** - * @deprecated use {@link Builder#numThread( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withNumThread(Integer numThread) { - this.numThread = numThread; - return this; - } - - /** - * @deprecated use {@link Builder#numKeep( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withNumKeep(Integer numKeep) { - this.numKeep = numKeep; - return this; - } - - /** - * @deprecated use {@link Builder#seed( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withSeed(Integer seed) { - this.seed = seed; - return this; - } - - /** - * @deprecated use {@link Builder#numPredict( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withNumPredict(Integer numPredict) { - this.numPredict = numPredict; - return this; - } - - /** - * @deprecated use {@link Builder#topK( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withTopK(Integer topK) { - this.topK = topK; - return this; - } - - /** - * @deprecated use {@link Builder#topP( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withTopP(Double topP) { - this.topP = topP; - return this; - } - - /** - * @deprecated use {@link Builder#tfsZ( Float)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withTfsZ(Float tfsZ) { - this.tfsZ = tfsZ; - return this; - } - - /** - * @deprecated use {@link Builder#typicalP( Float)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withTypicalP(Float typicalP) { - this.typicalP = typicalP; - return this; - } - - /** - * @deprecated use {@link Builder#repeatLastN( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withRepeatLastN(Integer repeatLastN) { - this.repeatLastN = repeatLastN; - return this; - } - - /** - * @deprecated use {@link Builder#temperature( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withTemperature(Double temperature) { - this.temperature = temperature; - return this; - } - - /** - * @deprecated use {@link Builder#repeatPenalty( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withRepeatPenalty(Double repeatPenalty) { - this.repeatPenalty = repeatPenalty; - return this; - } - - /** - * @deprecated use {@link Builder#presencePenalty( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withPresencePenalty(Double presencePenalty) { - this.presencePenalty = presencePenalty; - return this; - } - - /** - * @deprecated use {@link Builder#frequencyPenalty( Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withFrequencyPenalty(Double frequencyPenalty) { - this.frequencyPenalty = frequencyPenalty; - return this; - } - - /** - * @deprecated use {@link Builder#mirostat( Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withMirostat(Integer mirostat) { - this.mirostat = mirostat; - return this; - } - - /** - * @deprecated use {@link Builder#mirostatTau( Float)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withMirostatTau(Float mirostatTau) { - this.mirostatTau = mirostatTau; - return this; - } - - /** - * @deprecated use {@link Builder#mirostatEta( Float)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withMirostatEta(Float mirostatEta) { - this.mirostatEta = mirostatEta; - return this; - } - - /** - * @deprecated use {@link Builder#penalizeNewline( Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withPenalizeNewline(Boolean penalizeNewline) { - this.penalizeNewline = penalizeNewline; - return this; - } - - /** - * @deprecated use {@link Builder#stop( List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withStop(List stop) { - this.stop = stop; - return this; - } - - /** - * @deprecated use {@link Builder#functionCallbacks( List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withFunctionCallbacks(List functionCallbacks) { - this.functionCallbacks = functionCallbacks; - return this; - } - - /** - * @deprecated use {@link Builder#functions( Set)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withFunctions(Set functions) { - this.functions = functions; - return this; - } - - /** - * @deprecated use {@link Builder#function( String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withFunction(String functionName) { - Assert.hasText(functionName, "Function name must not be empty"); - this.functions.add(functionName); - return this; - } - - /** - * @deprecated use {@link Builder#proxyToolCalls( Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withProxyToolCalls(Boolean proxyToolCalls) { - this.proxyToolCalls = proxyToolCalls; - return this; - } - - /** - * @deprecated use {@link Builder#toolContext( Map)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public OllamaOptions withToolContext(Map toolContext) { - if (this.toolContext == null) { - this.toolContext = toolContext; - } - else { - this.toolContext.putAll(toolContext); - } - return this; - } - // ------------------- // Getters and Setters // ------------------- @@ -1371,318 +991,6 @@ public Builder toolContext(Map toolContext) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - return model(model); - } - - /** - * @deprecated use {@link #model(OllamaModel)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(OllamaModel model) { - return model(model); - } - - /** - * @deprecated use {@link #format(Object)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFormat(Object format) { - return format(format); - } - - /** - * @deprecated use {@link #keepAlive(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withKeepAlive(String keepAlive) { - return keepAlive(keepAlive); - } - - /** - * @deprecated use {@link #truncate(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTruncate(Boolean truncate) { - return truncate(truncate); - } - - /** - * @deprecated use {@link #useNUMA(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withUseNUMA(Boolean useNUMA) { - return useNUMA(useNUMA); - } - - /** - * @deprecated use {@link #numCtx(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withNumCtx(Integer numCtx) { - return numCtx(numCtx); - } - - /** - * @deprecated use {@link #numBatch(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withNumBatch(Integer numBatch) { - return numBatch(numBatch); - } - - /** - * @deprecated use {@link #numGPU(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withNumGPU(Integer numGPU) { - return numGPU(numGPU); - } - - /** - * @deprecated use {@link #mainGPU(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMainGPU(Integer mainGPU) { - return mainGPU(mainGPU); - } - - /** - * @deprecated use {@link #lowVRAM(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withLowVRAM(Boolean lowVRAM) { - return lowVRAM(lowVRAM); - } - - /** - * @deprecated use {@link #f16KV(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withF16KV(Boolean f16KV) { - return f16KV(f16KV); - } - - /** - * @deprecated use {@link #logitsAll(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withLogitsAll(Boolean logitsAll) { - return logitsAll(logitsAll); - } - - /** - * @deprecated use {@link #vocabOnly(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withVocabOnly(Boolean vocabOnly) { - return vocabOnly(vocabOnly); - } - - /** - * @deprecated use {@link #useMMap(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withUseMMap(Boolean useMMap) { - return useMMap(useMMap); - } - - /** - * @deprecated use {@link #useMLock(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withUseMLock(Boolean useMLock) { - return useMLock(useMLock); - } - - /** - * @deprecated use {@link #numThread(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withNumThread(Integer numThread) { - return numThread(numThread); - } - - /** - * @deprecated use {@link #numKeep(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withNumKeep(Integer numKeep) { - return numKeep(numKeep); - } - - /** - * @deprecated use {@link #seed(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSeed(Integer seed) { - return seed(seed); - } - - /** - * @deprecated use {@link #numPredict(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withNumPredict(Integer numPredict) { - return numPredict(numPredict); - } - - /** - * @deprecated use {@link #topK(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopK(Integer topK) { - return topK(topK); - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - return topP(topP); - } - - /** - * @deprecated use {@link #tfsZ(Float)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTfsZ(Float tfsZ) { - return tfsZ(tfsZ); - } - - /** - * @deprecated use {@link #typicalP(Float)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTypicalP(Float typicalP) { - return typicalP(typicalP); - } - - /** - * @deprecated use {@link #repeatLastN(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withRepeatLastN(Integer repeatLastN) { - return repeatLastN(repeatLastN); - } - - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - return temperature(temperature); - } - - /** - * @deprecated use {@link #repeatPenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withRepeatPenalty(Double repeatPenalty) { - return repeatPenalty(repeatPenalty); - } - - /** - * @deprecated use {@link #presencePenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPresencePenalty(Double presencePenalty) { - return presencePenalty(presencePenalty); - } - - /** - * @deprecated use {@link #frequencyPenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFrequencyPenalty(Double frequencyPenalty) { - return frequencyPenalty(frequencyPenalty); - } - - /** - * @deprecated use {@link #mirostat(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMirostat(Integer mirostat) { - return mirostat(mirostat); - } - - /** - * @deprecated use {@link #mirostatTau(Float)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMirostatTau(Float mirostatTau) { - return mirostatTau(mirostatTau); - } - - /** - * @deprecated use {@link #mirostatEta(Float)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMirostatEta(Float mirostatEta) { - return mirostatEta(mirostatEta); - } - - /** - * @deprecated use {@link #penalizeNewline(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPenalizeNewline(Boolean penalizeNewline) { - return penalizeNewline(penalizeNewline); - } - - /** - * @deprecated use {@link #stop(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStop(List stop) { - return stop(stop); - } - - /** - * @deprecated use {@link #functionCallbacks(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctionCallbacks(List functionCallbacks) { - return functionCallbacks(functionCallbacks); - } - - /** - * @deprecated use {@link #functions(Set)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctions(Set functions) { - return functions(functions); - } - - /** - * @deprecated use {@link #function(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunction(String functionName) { - return function(functionName); - } - - /** - * @deprecated use {@link #proxyToolCalls(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withProxyToolCalls(Boolean proxyToolCalls) { - return proxyToolCalls(proxyToolCalls); - } - - /** - * @deprecated use {@link #toolContext(Map)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withToolContext(Map toolContext) { - return toolContext(toolContext); - } - public OllamaOptions build() { return this.options; } diff --git a/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/management/ModelManagementOptions.java b/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/management/ModelManagementOptions.java index 25d65ad05dc..3e5148e6b97 100644 --- a/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/management/ModelManagementOptions.java +++ b/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/management/ModelManagementOptions.java @@ -71,42 +71,6 @@ public Builder maxRetries(Integer maxRetries) { return this; } - /** - * @deprecated use {@link #pullModelStrategy(PullModelStrategy)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPullModelStrategy(PullModelStrategy pullModelStrategy) { - this.pullModelStrategy = pullModelStrategy; - return this; - } - - /** - * @deprecated use {@link #additionalModels(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withAdditionalModels(List additionalModels) { - this.additionalModels = additionalModels; - return this; - } - - /** - * @deprecated use {@link #timeout(Duration)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTimeout(Duration timeout) { - this.timeout = timeout; - return this; - } - - /** - * @deprecated use {@link #maxRetries(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxRetries(Integer maxRetries) { - this.maxRetries = maxRetries; - return this; - } - public ModelManagementOptions build() { return new ModelManagementOptions(this.pullModelStrategy, this.additionalModels, this.timeout, this.maxRetries); diff --git a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiAudioSpeechOptions.java b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiAudioSpeechOptions.java index 531a25c7eca..6e9fcdb87bb 100644 --- a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiAudioSpeechOptions.java +++ b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiAudioSpeechOptions.java @@ -212,51 +212,6 @@ public Builder speed(Float speed) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.model = model; - return this; - } - - /** - * @deprecated use {@link #input(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withInput(String input) { - this.options.input = input; - return this; - } - - /** - * @deprecated use {@link #voice(Voice)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withVoice(Voice voice) { - this.options.voice = voice; - return this; - } - - /** - * @deprecated use {@link #responseFormat(AudioResponseFormat)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withResponseFormat(AudioResponseFormat responseFormat) { - this.options.responseFormat = responseFormat; - return this; - } - - /** - * @deprecated use {@link #speed(Float)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSpeed(Float speed) { - this.options.speed = speed; - return this; - } - public OpenAiAudioSpeechOptions build() { return this.options; } diff --git a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiAudioTranscriptionOptions.java b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiAudioTranscriptionOptions.java index dc84ef32a2c..a03688d04b9 100644 --- a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiAudioTranscriptionOptions.java +++ b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiAudioTranscriptionOptions.java @@ -212,60 +212,6 @@ public Builder granularityType(GranularityType granularityType) { return this; } - /** - * @deprecated use {@link #model( String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.model = model; - return this; - } - - /** - * @deprecated use {@link #language( String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withLanguage(String language) { - this.options.language = language; - return this; - } - - /** - * @deprecated use {@link #prompt( String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPrompt(String prompt) { - this.options.prompt = prompt; - return this; - } - - /** - * @deprecated use {@link #responseFormat( TranscriptResponseFormat)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withResponseFormat(TranscriptResponseFormat responseFormat) { - this.options.responseFormat = responseFormat; - return this; - } - - /** - * @deprecated use {@link #temperature( Float)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Float temperature) { - this.options.temperature = temperature; - return this; - } - - /** - * @deprecated use {@link #granularityType( GranularityType)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withGranularityType(GranularityType granularityType) { - this.options.granularityType = granularityType; - return this; - } - public OpenAiAudioTranscriptionOptions build() { return this.options; } diff --git a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiChatOptions.java b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiChatOptions.java index 49f029dc286..ac3743831cc 100644 --- a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiChatOptions.java +++ b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiChatOptions.java @@ -702,265 +702,6 @@ public Builder toolContext(Map toolContext) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.model = model; - return this; - } - - /** - * @deprecated use {@link #model(OpenAiApi.ChatModel)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(OpenAiApi.ChatModel openAiChatModel) { - this.options.model = openAiChatModel.getName(); - return this; - } - - /** - * @deprecated use {@link #frequencyPenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFrequencyPenalty(Double frequencyPenalty) { - this.options.frequencyPenalty = frequencyPenalty; - return this; - } - - /** - * @deprecated use {@link #logitBias(Map)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withLogitBias(Map logitBias) { - this.options.logitBias = logitBias; - return this; - } - - /** - * @deprecated use {@link #logprobs(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withLogprobs(Boolean logprobs) { - this.options.logprobs = logprobs; - return this; - } - - /** - * @deprecated use {@link #topLogprobs(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopLogprobs(Integer topLogprobs) { - this.options.topLogprobs = topLogprobs; - return this; - } - - /** - * @deprecated use {@link #maxTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokens(Integer maxTokens) { - this.options.maxTokens = maxTokens; - return this; - } - - /** - * @deprecated use {@link #maxCompletionTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxCompletionTokens(Integer maxCompletionTokens) { - this.options.maxCompletionTokens = maxCompletionTokens; - return this; - } - - /** - * @deprecated use {@link #N(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withN(Integer n) { - this.options.n = n; - return this; - } - - /** - * @deprecated use {@link #outputModalities(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withOutputModalities(List modalities) { - this.options.outputModalities = modalities; - return this; - } - - /** - * @deprecated use {@link #outputAudio(AudioParameters)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withOutputAudio(AudioParameters audio) { - this.options.outputAudio = audio; - return this; - } - - /** - * @deprecated use {@link #presencePenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPresencePenalty(Double presencePenalty) { - this.options.presencePenalty = presencePenalty; - return this; - } - - /** - * @deprecated use {@link #responseFormat(ResponseFormat)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withResponseFormat(ResponseFormat responseFormat) { - this.options.responseFormat = responseFormat; - return this; - } - - /** - * @deprecated use {@link #streamUsage(boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStreamUsage(boolean enableStreamUsage) { - this.options.streamOptions = (enableStreamUsage) ? StreamOptions.INCLUDE_USAGE : null; - return this; - } - - /** - * @deprecated use {@link #seed(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSeed(Integer seed) { - this.options.seed = seed; - return this; - } - - /** - * @deprecated use {@link #stop(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStop(List stop) { - this.options.stop = stop; - return this; - } - - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.options.temperature = temperature; - return this; - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.options.topP = topP; - return this; - } - - /** - * @deprecated use {@link #tools(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTools(List tools) { - this.options.tools = tools; - return this; - } - - /** - * @deprecated use {@link #toolChoice(Object)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withToolChoice(Object toolChoice) { - this.options.toolChoice = toolChoice; - return this; - } - - /** - * @deprecated use {@link #user(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withUser(String user) { - this.options.user = user; - return this; - } - - /** - * @deprecated use {@link #parallelToolCalls(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withParallelToolCalls(Boolean parallelToolCalls) { - this.options.parallelToolCalls = parallelToolCalls; - return this; - } - - /** - * @deprecated use {@link #functionCallbacks(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctionCallbacks(List functionCallbacks) { - this.options.functionCallbacks = functionCallbacks; - return this; - } - - /** - * @deprecated use {@link #functions(Set)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctions(Set functionNames) { - Assert.notNull(functionNames, "Function names must not be null"); - this.options.functions = functionNames; - return this; - } - - /** - * @deprecated use {@link #function(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunction(String functionName) { - Assert.hasText(functionName, "Function name must not be empty"); - this.options.functions.add(functionName); - return this; - } - - /** - * @deprecated use {@link #proxyToolCalls(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withProxyToolCalls(Boolean proxyToolCalls) { - this.options.proxyToolCalls = proxyToolCalls; - return this; - } - - /** - * @deprecated use {@link #httpHeaders(Map)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withHttpHeaders(Map httpHeaders) { - this.options.httpHeaders = httpHeaders; - return this; - } - - /** - * @deprecated use {@link #toolContext(Map)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withToolContext(Map toolContext) { - if (this.options.toolContext == null) { - this.options.toolContext = toolContext; - } - else { - this.options.toolContext.putAll(toolContext); - } - return this; - } - public OpenAiChatOptions build() { return this.options; } diff --git a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiEmbeddingOptions.java b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiEmbeddingOptions.java index 08c1fa60dc5..54ba275dd61 100644 --- a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiEmbeddingOptions.java +++ b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiEmbeddingOptions.java @@ -117,42 +117,6 @@ public Builder user(String user) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.setModel(model); - return this; - } - - /** - * @deprecated use {@link #encodingFormat(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withEncodingFormat(String encodingFormat) { - this.options.setEncodingFormat(encodingFormat); - return this; - } - - /** - * @deprecated use {@link #dimensions(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withDimensions(Integer dimensions) { - this.options.dimensions = dimensions; - return this; - } - - /** - * @deprecated use {@link #user(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withUser(String user) { - this.options.setUser(user); - return this; - } - public OpenAiEmbeddingOptions build() { return this.options; } diff --git a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiModerationOptions.java b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiModerationOptions.java index 1113c1fad20..10fdb265128 100644 --- a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiModerationOptions.java +++ b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiModerationOptions.java @@ -64,15 +64,6 @@ public Builder model(String model) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.setModel(model); - return this; - } - public OpenAiModerationOptions build() { return this.options; } diff --git a/models/spring-ai-postgresml/src/main/java/org/springframework/ai/postgresml/PostgresMlEmbeddingOptions.java b/models/spring-ai-postgresml/src/main/java/org/springframework/ai/postgresml/PostgresMlEmbeddingOptions.java index a1054975889..847fdcf7e00 100644 --- a/models/spring-ai-postgresml/src/main/java/org/springframework/ai/postgresml/PostgresMlEmbeddingOptions.java +++ b/models/spring-ai-postgresml/src/main/java/org/springframework/ai/postgresml/PostgresMlEmbeddingOptions.java @@ -142,51 +142,6 @@ public Builder metadataMode(MetadataMode metadataMode) { return this; } - /** - * @deprecated use {@link #transformer(String)} )} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTransformer(String transformer) { - this.options.setTransformer(transformer); - return this; - } - - /** - * @deprecated use {@link #vectorType(VectorType)} )} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withVectorType(VectorType vectorType) { - this.options.setVectorType(vectorType); - return this; - } - - /** - * @deprecated use {@link #kwargs(String)} )} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withKwargs(String kwargs) { - this.options.setKwargs(ModelOptionsUtils.objectToMap(kwargs)); - return this; - } - - /** - * @deprecated use {@link #kwargs(Map)} )} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withKwargs(Map kwargs) { - this.options.setKwargs(kwargs); - return this; - } - - /** - * @deprecated use {@link #metadataMode(MetadataMode)} )} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMetadataMode(MetadataMode metadataMode) { - this.options.setMetadataMode(metadataMode); - return this; - } - public PostgresMlEmbeddingOptions build() { return this.options; } diff --git a/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/QianFanChatOptions.java b/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/QianFanChatOptions.java index dc8ca16b2cc..5531e90a88a 100644 --- a/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/QianFanChatOptions.java +++ b/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/QianFanChatOptions.java @@ -337,80 +337,6 @@ public Builder topP(Double topP) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.model = model; - return this; - } - - /** - * @deprecated use {@link #frequencyPenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFrequencyPenalty(Double frequencyPenalty) { - this.options.frequencyPenalty = frequencyPenalty; - return this; - } - - /** - * @deprecated use {@link #maxTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokens(Integer maxTokens) { - this.options.maxTokens = maxTokens; - return this; - } - - /** - * @deprecated use {@link #presencePenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPresencePenalty(Double presencePenalty) { - this.options.presencePenalty = presencePenalty; - return this; - } - - /** - * @deprecated use - * {@link #responseFormat(QianFanApi.ChatCompletionRequest.ResponseFormat)} - * instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withResponseFormat(QianFanApi.ChatCompletionRequest.ResponseFormat responseFormat) { - this.options.responseFormat = responseFormat; - return this; - } - - /** - * @deprecated use {@link #stop(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStop(List stop) { - this.options.stop = stop; - return this; - } - - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.options.temperature = temperature; - return this; - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.options.topP = topP; - return this; - } - public QianFanChatOptions build() { return this.options; } diff --git a/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/QianFanEmbeddingOptions.java b/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/QianFanEmbeddingOptions.java index 35fd429d9de..3d60f84fa1f 100644 --- a/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/QianFanEmbeddingOptions.java +++ b/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/QianFanEmbeddingOptions.java @@ -92,24 +92,6 @@ public Builder user(String user) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.setModel(model); - return this; - } - - /** - * @deprecated use {@link #user(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withUser(String user) { - this.options.setUser(user); - return this; - } - public QianFanEmbeddingOptions build() { return this.options; } diff --git a/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/QianFanImageOptions.java b/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/QianFanImageOptions.java index cf39c3d7197..cde925b216c 100644 --- a/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/QianFanImageOptions.java +++ b/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/QianFanImageOptions.java @@ -227,60 +227,6 @@ public Builder user(String user) { return this; } - /** - * @deprecated use {@link #N(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withN(Integer n) { - this.options.setN(n); - return this; - } - - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.setModel(model); - return this; - } - - /** - * @deprecated use {@link #width(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withWidth(Integer width) { - this.options.setWidth(width); - return this; - } - - /** - * @deprecated use {@link #height(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withHeight(Integer height) { - this.options.setHeight(height); - return this; - } - - /** - * @deprecated use {@link #style(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStyle(String style) { - this.options.setStyle(style); - return this; - } - - /** - * @deprecated use {@link #user(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withUser(String user) { - this.options.setUser(user); - return this; - } - public QianFanImageOptions build() { return this.options; } diff --git a/models/spring-ai-stability-ai/src/main/java/org/springframework/ai/stabilityai/api/StabilityAiApi.java b/models/spring-ai-stability-ai/src/main/java/org/springframework/ai/stabilityai/api/StabilityAiApi.java index 6963f7b2ac5..4a2e53e0aab 100644 --- a/models/spring-ai-stability-ai/src/main/java/org/springframework/ai/stabilityai/api/StabilityAiApi.java +++ b/models/spring-ai-stability-ai/src/main/java/org/springframework/ai/stabilityai/api/StabilityAiApi.java @@ -187,96 +187,6 @@ public Builder stylePreset(String stylePreset) { return this; } - /** - * @deprecated use {@link #textPrompts(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTextPrompts(List textPrompts) { - this.textPrompts = textPrompts; - return this; - } - - /** - * @deprecated use {@link #height(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withHeight(Integer height) { - this.height = height; - return this; - } - - /** - * @deprecated use {@link #width(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withWidth(Integer width) { - this.width = width; - return this; - } - - /** - * @deprecated use {@link #cfgScale(Float)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withCfgScale(Float cfgScale) { - this.cfgScale = cfgScale; - return this; - } - - /** - * @deprecated use {@link #clipGuidancePreset(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withClipGuidancePreset(String clipGuidancePreset) { - this.clipGuidancePreset = clipGuidancePreset; - return this; - } - - /** - * @deprecated use {@link #sampler(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSampler(String sampler) { - this.sampler = sampler; - return this; - } - - /** - * @deprecated use {@link #samples(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSamples(Integer samples) { - this.samples = samples; - return this; - } - - /** - * @deprecated use {@link #seed(Long)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSeed(Long seed) { - this.seed = seed; - return this; - } - - /** - * @deprecated use {@link #steps(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSteps(Integer steps) { - this.steps = steps; - return this; - } - - /** - * @deprecated use {@link #stylePreset(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStylePreset(String stylePreset) { - this.stylePreset = stylePreset; - return this; - } - public GenerateImageRequest build() { return new GenerateImageRequest(this.textPrompts, this.height, this.width, this.cfgScale, this.clipGuidancePreset, this.sampler, this.samples, this.seed, this.steps, this.stylePreset); diff --git a/models/spring-ai-stability-ai/src/main/java/org/springframework/ai/stabilityai/api/StabilityAiImageOptions.java b/models/spring-ai-stability-ai/src/main/java/org/springframework/ai/stabilityai/api/StabilityAiImageOptions.java index c411715a84b..1d6f480238b 100644 --- a/models/spring-ai-stability-ai/src/main/java/org/springframework/ai/stabilityai/api/StabilityAiImageOptions.java +++ b/models/spring-ai-stability-ai/src/main/java/org/springframework/ai/stabilityai/api/StabilityAiImageOptions.java @@ -499,123 +499,6 @@ public Builder stylePreset(StyleEnum styleEnum) { return this; } - /** - * @deprecated use {@link #N(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withN(Integer n) { - this.options.setN(n); - return this; - } - - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.setModel(model); - return this; - } - - /** - * @deprecated use {@link #width(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withWidth(Integer width) { - this.options.setWidth(width); - return this; - } - - /** - * @deprecated use {@link #height(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withHeight(Integer height) { - this.options.setHeight(height); - return this; - } - - /** - * @deprecated use {@link #responseFormat(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withResponseFormat(String responseFormat) { - this.options.setResponseFormat(responseFormat); - return this; - } - - /** - * @deprecated use {@link #cfgScale(Float)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withCfgScale(Float cfgScale) { - this.options.setCfgScale(cfgScale); - return this; - } - - /** - * @deprecated use {@link #clipGuidancePreset(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withClipGuidancePreset(String clipGuidancePreset) { - this.options.setClipGuidancePreset(clipGuidancePreset); - return this; - } - - /** - * @deprecated use {@link #sampler(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSampler(String sampler) { - this.options.setSampler(sampler); - return this; - } - - /** - * @deprecated use {@link #seed(Long)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSeed(Long seed) { - this.options.setSeed(seed); - return this; - } - - /** - * @deprecated use {@link #steps(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSteps(Integer steps) { - this.options.setSteps(steps); - return this; - } - - /** - * @deprecated use {@link #samples(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSamples(Integer samples) { - this.options.setN(samples); - return this; - } - - /** - * @deprecated use {@link #stylePreset(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStylePreset(String stylePreset) { - this.options.setStylePreset(stylePreset); - return this; - } - - /** - * @deprecated use {@link #stylePreset(StyleEnum)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStylePreset(StyleEnum styleEnum) { - this.options.setStylePreset(styleEnum.toString()); - return this; - } - public StabilityAiImageOptions build() { return this.options; } diff --git a/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/VertexAiEmbeddingConnectionDetails.java b/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/VertexAiEmbeddingConnectionDetails.java index c8dae1bba74..bbc1c5ffdb4 100644 --- a/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/VertexAiEmbeddingConnectionDetails.java +++ b/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/VertexAiEmbeddingConnectionDetails.java @@ -151,52 +151,6 @@ public Builder predictionServiceSettings(PredictionServiceSettings predictionSer return this; } - /** - * @deprecated use {@link #apiEndpoint(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withApiEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * @deprecated use {@link #projectId(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withProjectId(String projectId) { - this.projectId = projectId; - return this; - } - - /** - * @deprecated use {@link #location(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withLocation(String location) { - this.location = location; - return this; - } - - /** - * @deprecated use {@link #publisher(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPublisher(String publisher) { - this.publisher = publisher; - return this; - } - - /** - * @deprecated use {@link #predictionServiceSettings(PredictionServiceSettings)} - * instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withPredictionServiceSettings(PredictionServiceSettings predictionServiceSettings) { - this.predictionServiceSettings = predictionServiceSettings; - return this; - } - public VertexAiEmbeddingConnectionDetails build() { if (!StringUtils.hasText(this.endpoint)) { if (!StringUtils.hasText(this.location)) { diff --git a/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/VertexAiEmbeddingUtils.java b/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/VertexAiEmbeddingUtils.java index ac99abb33e1..16bf6a24bf7 100644 --- a/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/VertexAiEmbeddingUtils.java +++ b/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/VertexAiEmbeddingUtils.java @@ -95,26 +95,6 @@ public TextParametersBuilder autoTruncate(Boolean autoTruncate) { return this; } - /** - * @deprecated use {@link #outputDimensionality(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public TextParametersBuilder withOutputDimensionality(Integer outputDimensionality) { - Assert.notNull(outputDimensionality, "Output dimensionality must not be null"); - this.outputDimensionality = outputDimensionality; - return this; - } - - /** - * @deprecated use {@link #autoTruncate(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public TextParametersBuilder withAutoTruncate(Boolean autoTruncate) { - Assert.notNull(autoTruncate, "Auto truncate must not be null"); - this.autoTruncate = autoTruncate; - return this; - } - public Struct build() { Struct.Builder textParametersBuilder = Struct.newBuilder(); @@ -156,26 +136,6 @@ public TextInstanceBuilder title(String title) { return this; } - /** - * @deprecated use {@link #taskType(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public TextInstanceBuilder withTaskType(String taskType) { - Assert.hasText(taskType, "Task type must not be empty"); - this.taskType = taskType; - return this; - } - - /** - * @deprecated use {@link #title(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public TextInstanceBuilder withTitle(String title) { - Assert.hasText(title, "Title must not be empty"); - this.title = title; - return this; - } - public Struct build() { Struct.Builder textBuilder = Struct.newBuilder(); textBuilder.putFields("content", valueOf(this.content)); @@ -245,47 +205,6 @@ public MultimodalInstanceBuilder video(Struct video) { return this; } - /** - * @deprecated use {@link #text(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public MultimodalInstanceBuilder withText(String text) { - Assert.hasText(text, "Text must not be empty"); - this.text = text; - return this; - } - - /** - * @deprecated use {@link #dimension(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public MultimodalInstanceBuilder withDimension(Integer dimension) { - Assert.isTrue(dimension == 128 || dimension == 256 || dimension == 512 || dimension == 1408, - "Invalid dimension value: " + dimension + ". Accepted values: 128, 256, 512, or 1408."); - this.dimension = dimension; - return this; - } - - /** - * @deprecated use {@link #image(Struct)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public MultimodalInstanceBuilder withImage(Struct image) { - Assert.notNull(image, "Image must not be null"); - this.image = image; - return this; - } - - /** - * @deprecated use {@link #video(Struct)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public MultimodalInstanceBuilder withVideo(Struct video) { - Assert.notNull(video, "Video must not be null"); - this.video = video; - return this; - } - public Struct build() { Struct.Builder builder = Struct.newBuilder(); @@ -362,43 +281,6 @@ public ImageBuilder gcsUri(String gcsUri) { return this; } - /** - * @deprecated use {@link #imageData(Object)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public ImageBuilder withImageData(Object imageData) { - Assert.notNull(imageData, "Image data must not be null"); - if (imageData instanceof byte[] bytes) { - return withImageBytes(bytes); - } - else if (imageData instanceof String uri) { - return withGcsUri(uri); - } - else { - throw new IllegalArgumentException("Unsupported image data type: " + imageData.getClass()); - } - } - - /** - * @deprecated use {@link #imageBytes(byte[])} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public ImageBuilder withImageBytes(byte[] imageBytes) { - Assert.notNull(imageBytes, "Image bytes must not be null"); - this.imageBytes = imageBytes; - return this; - } - - /** - * @deprecated use {@link #gcsUri(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public ImageBuilder withGcsUri(String gcsUri) { - Assert.hasText(gcsUri, "GCS URI must not be empty"); - this.gcsUri = gcsUri; - return this; - } - public Struct build() { Struct.Builder imageBuilder = Struct.newBuilder(); @@ -517,77 +399,6 @@ public VideoBuilder intervalSec(Integer intervalSec) { return this; } - /** - * @deprecated use {@link #videoData(Object)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public VideoBuilder withVideoData(Object imageData) { - Assert.notNull(imageData, "Video data must not be null"); - if (imageData instanceof byte[] imageBytes) { - return videoBytes(imageBytes); - } - else if (imageData instanceof String uri) { - return gcsUri(uri); - } - else { - throw new IllegalArgumentException("Unsupported image data type: " + imageData.getClass()); - } - } - - /** - * @deprecated use {@link #videoBytes(byte[])} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public VideoBuilder withVideoBytes(byte[] imageBytes) { - Assert.notNull(imageBytes, "Video bytes must not be null"); - this.videoBytes = imageBytes; - return this; - } - - /** - * @deprecated use {@link #gcsUri(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public VideoBuilder withGcsUri(String gcsUri) { - Assert.hasText(gcsUri, "GCS URI must not be empty"); - this.gcsUri = gcsUri; - return this; - } - - /** - * @deprecated use {@link #startOffsetSec(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public VideoBuilder withStartOffsetSec(Integer startOffsetSec) { - if (startOffsetSec != null) { - this.startOffsetSec = startOffsetSec; - } - return this; - } - - /** - * @deprecated use {@link #endOffsetSec(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public VideoBuilder withEndOffsetSec(Integer endOffsetSec) { - if (endOffsetSec != null) { - this.endOffsetSec = endOffsetSec; - } - return this; - - } - - /** - * @deprecated use {@link #intervalSec(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public VideoBuilder withIntervalSec(Integer intervalSec) { - if (intervalSec != null) { - this.intervalSec = intervalSec; - } - return this; - } - public Struct build() { Struct.Builder videoBuilder = Struct.newBuilder(); diff --git a/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/multimodal/VertexAiMultimodalEmbeddingOptions.java b/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/multimodal/VertexAiMultimodalEmbeddingOptions.java index 986fe29bb44..ada536e66ae 100644 --- a/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/multimodal/VertexAiMultimodalEmbeddingOptions.java +++ b/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/multimodal/VertexAiMultimodalEmbeddingOptions.java @@ -205,60 +205,6 @@ public Builder videoIntervalSec(Integer videoIntervalSec) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.setModel(model); - return this; - } - - /** - * @deprecated use {@link #model(VertexAiMultimodalEmbeddingModelName)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(VertexAiMultimodalEmbeddingModelName model) { - this.options.setModel(model.getName()); - return this; - } - - /** - * @deprecated use {@link #dimensions(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withDimensions(Integer dimensions) { - this.options.setDimensions(dimensions); - return this; - } - - /** - * @deprecated use {@link #videoStartOffsetSec(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withVideoStartOffsetSec(Integer videoStartOffsetSec) { - this.options.setVideoStartOffsetSec(videoStartOffsetSec); - return this; - } - - /** - * @deprecated use {@link #videoEndOffsetSec(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withVideoEndOffsetSec(Integer videoEndOffsetSec) { - this.options.setVideoEndOffsetSec(videoEndOffsetSec); - return this; - } - - /** - * @deprecated use {@link #videoIntervalSec(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withVideoIntervalSec(Integer videoIntervalSec) { - this.options.setVideoIntervalSec(videoIntervalSec); - return this; - } - public VertexAiMultimodalEmbeddingOptions build() { return this.options; } diff --git a/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/text/VertexAiTextEmbeddingOptions.java b/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/text/VertexAiTextEmbeddingOptions.java index 403d5b9f649..42d16407710 100644 --- a/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/text/VertexAiTextEmbeddingOptions.java +++ b/models/spring-ai-vertex-ai-embedding/src/main/java/org/springframework/ai/vertexai/embedding/text/VertexAiTextEmbeddingOptions.java @@ -223,60 +223,6 @@ public Builder autoTruncate(Boolean autoTruncate) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.setModel(model); - return this; - } - - /** - * @deprecated use {@link #model(VertexAiTextEmbeddingModelName)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(VertexAiTextEmbeddingModelName model) { - this.options.setModel(model.getName()); - return this; - } - - /** - * @deprecated use {@link #taskType(TaskType)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTaskType(TaskType taskType) { - this.options.setTaskType(taskType); - return this; - } - - /** - * @deprecated use {@link #dimensions(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withDimensions(Integer dimensions) { - this.options.dimensions = dimensions; - return this; - } - - /** - * @deprecated use {@link #title(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTitle(String user) { - this.options.setTitle(user); - return this; - } - - /** - * @deprecated use {@link #autoTruncate(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withAutoTruncate(Boolean autoTruncate) { - this.options.setAutoTruncate(autoTruncate); - return this; - } - public VertexAiTextEmbeddingOptions build() { return this.options; } diff --git a/models/spring-ai-vertex-ai-gemini/src/main/java/org/springframework/ai/vertexai/gemini/VertexAiGeminiChatOptions.java b/models/spring-ai-vertex-ai-gemini/src/main/java/org/springframework/ai/vertexai/gemini/VertexAiGeminiChatOptions.java index 9f06deeed57..631a4df2717 100644 --- a/models/spring-ai-vertex-ai-gemini/src/main/java/org/springframework/ai/vertexai/gemini/VertexAiGeminiChatOptions.java +++ b/models/spring-ai-vertex-ai-gemini/src/main/java/org/springframework/ai/vertexai/gemini/VertexAiGeminiChatOptions.java @@ -503,156 +503,6 @@ public Builder toolContext(Map toolContext) { return this; } - /** - * @deprecated use {@link #stopSequences(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStopSequences(List stopSequences) { - this.options.setStopSequences(stopSequences); - return this; - } - - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.options.setTemperature(temperature); - return this; - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.options.setTopP(topP); - return this; - } - - /** - * @deprecated use {@link #topK(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopK(Integer topK) { - this.options.setTopK(topK); - return this; - } - - /** - * @deprecated use {@link #candidateCount(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withCandidateCount(Integer candidateCount) { - this.options.setCandidateCount(candidateCount); - return this; - } - - /** - * @deprecated use {@link #maxOutputTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxOutputTokens(Integer maxOutputTokens) { - this.options.setMaxOutputTokens(maxOutputTokens); - return this; - } - - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String modelName) { - this.options.setModel(modelName); - return this; - } - - /** - * @deprecated use {@link #model(ChatModel)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(ChatModel model) { - this.options.setModel(model.getValue()); - return this; - } - - /** - * @deprecated use {@link #responseMimeType(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withResponseMimeType(String mimeType) { - Assert.notNull(mimeType, "mimeType must not be null"); - this.options.setResponseMimeType(mimeType); - return this; - } - - /** - * @deprecated use {@link #functionCallbacks(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctionCallbacks(List functionCallbacks) { - this.options.functionCallbacks = functionCallbacks; - return this; - } - - /** - * @deprecated use {@link #functions(Set)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctions(Set functionNames) { - Assert.notNull(functionNames, "Function names must not be null"); - this.options.functions = functionNames; - return this; - } - - /** - * @deprecated use {@link #function(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunction(String functionName) { - Assert.hasText(functionName, "Function name must not be empty"); - this.options.functions.add(functionName); - return this; - } - - /** - * @deprecated use {@link #googleSearchRetrieval(boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withGoogleSearchRetrieval(boolean googleSearch) { - this.options.googleSearchRetrieval = googleSearch; - return this; - } - - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withSafetySettings(List safetySettings) { - Assert.notNull(safetySettings, "safetySettings must not be null"); - this.options.safetySettings = safetySettings; - return this; - } - - /** - * @deprecated use {@link #proxyToolCalls(boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withProxyToolCalls(boolean proxyToolCalls) { - this.options.proxyToolCalls = proxyToolCalls; - return this; - } - - /** - * @deprecated use {@link #toolContext(Map)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withToolContext(Map toolContext) { - if (this.options.toolContext == null) { - this.options.toolContext = toolContext; - } - else { - this.options.toolContext.putAll(toolContext); - } - return this; - } - public VertexAiGeminiChatOptions build() { return this.options; } diff --git a/models/spring-ai-watsonx-ai/src/main/java/org/springframework/ai/watsonx/WatsonxAiChatOptions.java b/models/spring-ai-watsonx-ai/src/main/java/org/springframework/ai/watsonx/WatsonxAiChatOptions.java index d41b0022b03..f6413c759cb 100644 --- a/models/spring-ai-watsonx-ai/src/main/java/org/springframework/ai/watsonx/WatsonxAiChatOptions.java +++ b/models/spring-ai-watsonx-ai/src/main/java/org/springframework/ai/watsonx/WatsonxAiChatOptions.java @@ -387,102 +387,6 @@ public Builder additionalProperties(Map properties) { return this; } - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - return temperature(temperature); - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - return topP(topP); - } - - /** - * @deprecated use {@link #topK(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopK(Integer topK) { - return topK(topK); - } - - /** - * @deprecated use {@link #decodingMethod(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withDecodingMethod(String decodingMethod) { - return decodingMethod(decodingMethod); - } - - /** - * @deprecated use {@link #maxNewTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxNewTokens(Integer maxNewTokens) { - return maxNewTokens(maxNewTokens); - } - - /** - * @deprecated use {@link #minNewTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMinNewTokens(Integer minNewTokens) { - return minNewTokens(minNewTokens); - } - - /** - * @deprecated use {@link #stopSequences(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStopSequences(List stopSequences) { - return stopSequences(stopSequences); - } - - /** - * @deprecated use {@link #repetitionPenalty(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withRepetitionPenalty(Double repetitionPenalty) { - return repetitionPenalty(repetitionPenalty); - } - - /** - * @deprecated use {@link #randomSeed(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withRandomSeed(Integer randomSeed) { - return randomSeed(randomSeed); - } - - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - return model(model); - } - - /** - * @deprecated use {@link #additionalProperty(String, Object)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withAdditionalProperty(String key, Object value) { - return additionalProperty(key, value); - } - - /** - * @deprecated use {@link #additionalProperties(Map)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withAdditionalProperties(Map properties) { - return additionalProperties(properties); - } - public WatsonxAiChatOptions build() { return this.options; } diff --git a/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/ZhiPuAiChatOptions.java b/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/ZhiPuAiChatOptions.java index 6a10d1d2710..f57303b1138 100644 --- a/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/ZhiPuAiChatOptions.java +++ b/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/ZhiPuAiChatOptions.java @@ -595,148 +595,6 @@ public Builder toolContext(Map toolContext) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.model = model; - return this; - } - - /** - * @deprecated use {@link #maxTokens(Integer)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withMaxTokens(Integer maxTokens) { - this.options.maxTokens = maxTokens; - return this; - } - - /** - * @deprecated use {@link #stop(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withStop(List stop) { - this.options.stop = stop; - return this; - } - - /** - * @deprecated use {@link #temperature(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTemperature(Double temperature) { - this.options.temperature = temperature; - return this; - } - - /** - * @deprecated use {@link #topP(Double)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTopP(Double topP) { - this.options.topP = topP; - return this; - } - - /** - * @deprecated use {@link #tools(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withTools(List tools) { - this.options.tools = tools; - return this; - } - - /** - * @deprecated use {@link #toolChoice(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withToolChoice(String toolChoice) { - this.options.toolChoice = toolChoice; - return this; - } - - /** - * @deprecated use {@link #user(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withUser(String user) { - this.options.user = user; - return this; - } - - /** - * @deprecated use {@link #requestId(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withRequestId(String requestId) { - this.options.requestId = requestId; - return this; - } - - /** - * @deprecated use {@link #doSample(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withDoSample(Boolean doSample) { - this.options.doSample = doSample; - return this; - } - - /** - * @deprecated use {@link #functionCallbacks(List)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctionCallbacks(List functionCallbacks) { - this.options.functionCallbacks = functionCallbacks; - return this; - } - - /** - * @deprecated use {@link #functions(Set)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunctions(Set functionNames) { - Assert.notNull(functionNames, "Function names must not be null"); - this.options.functions = functionNames; - return this; - } - - /** - * @deprecated use {@link #function(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withFunction(String functionName) { - Assert.hasText(functionName, "Function name must not be empty"); - this.options.functions.add(functionName); - return this; - } - - /** - * @deprecated use {@link #proxyToolCalls(Boolean)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withProxyToolCalls(Boolean proxyToolCalls) { - this.options.proxyToolCalls = proxyToolCalls; - return this; - } - - /** - * @deprecated use {@link #toolContext(Map)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withToolContext(Map toolContext) { - if (this.options.toolContext == null) { - this.options.toolContext = toolContext; - } - else { - this.options.toolContext.putAll(toolContext); - } - return this; - } - public ZhiPuAiChatOptions build() { return this.options; } diff --git a/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/ZhiPuAiEmbeddingOptions.java b/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/ZhiPuAiEmbeddingOptions.java index 7855d53fbef..aa3d6fa3fec 100644 --- a/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/ZhiPuAiEmbeddingOptions.java +++ b/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/ZhiPuAiEmbeddingOptions.java @@ -73,15 +73,6 @@ public Builder model(String model) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.setModel(model); - return this; - } - public ZhiPuAiEmbeddingOptions build() { return this.options; } diff --git a/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/ZhiPuAiImageOptions.java b/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/ZhiPuAiImageOptions.java index 8b432b02afb..116b7293830 100644 --- a/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/ZhiPuAiImageOptions.java +++ b/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/ZhiPuAiImageOptions.java @@ -153,24 +153,6 @@ public Builder user(String user) { return this; } - /** - * @deprecated use {@link #model(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withModel(String model) { - this.options.setModel(model); - return this; - } - - /** - * @deprecated use {@link #user(String)} instead. - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public Builder withUser(String user) { - this.options.setUser(user); - return this; - } - public ZhiPuAiImageOptions build() { return this.options; }