Skip to content

Commit c70b603

Browse files
ilayaperumalgleijendary
authored andcommitted
Remove deprecated methods from models
Signed-off-by: leijendary <[email protected]>
1 parent 8cbb25c commit c70b603

File tree

49 files changed

+0
-4220
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+0
-4220
lines changed

models/spring-ai-anthropic/src/main/java/org/springframework/ai/anthropic/AnthropicChatOptions.java

Lines changed: 0 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -300,110 +300,6 @@ public Builder toolContext(Map<String, Object> toolContext) {
300300
return this;
301301
}
302302

303-
/**
304-
* @deprecated use {@link #model(String)} instead.
305-
*/
306-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
307-
public Builder withModel(String model) {
308-
return model(model);
309-
}
310-
311-
/**
312-
* @deprecated use {@link #model(AnthropicApi.ChatModel)} instead.
313-
*/
314-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
315-
public Builder withModel(AnthropicApi.ChatModel model) {
316-
return model(model);
317-
}
318-
319-
/**
320-
* @deprecated use {@link #maxTokens(Integer)} instead.
321-
*/
322-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
323-
public Builder withMaxTokens(Integer maxTokens) {
324-
return maxTokens(maxTokens);
325-
}
326-
327-
/**
328-
* @deprecated use {@link #metadata(ChatCompletionRequest.Metadata)} instead.
329-
*/
330-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
331-
public Builder withMetadata(ChatCompletionRequest.Metadata metadata) {
332-
return metadata(metadata);
333-
}
334-
335-
/**
336-
* @deprecated use {@link #stopSequences(List)} instead.
337-
*/
338-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
339-
public Builder withStopSequences(List<String> stopSequences) {
340-
return stopSequences(stopSequences);
341-
}
342-
343-
/**
344-
* @deprecated use {@link #temperature(Double)} instead.
345-
*/
346-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
347-
public Builder withTemperature(Double temperature) {
348-
return temperature(temperature);
349-
}
350-
351-
/**
352-
* @deprecated use {@link #topP(Double)} instead.
353-
*/
354-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
355-
public Builder withTopP(Double topP) {
356-
return topP(topP);
357-
}
358-
359-
/**
360-
* @deprecated use {@link #topK(Integer)} instead.
361-
*/
362-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
363-
public Builder withTopK(Integer topK) {
364-
return topK(topK);
365-
}
366-
367-
/**
368-
* @deprecated use {@link #functionCallbacks(List)} instead.
369-
*/
370-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
371-
public Builder withFunctionCallbacks(List<FunctionCallback> functionCallbacks) {
372-
return functionCallbacks(functionCallbacks);
373-
}
374-
375-
/**
376-
* @deprecated use {@link #functions(Set)} instead.
377-
*/
378-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
379-
public Builder withFunctions(Set<String> functionNames) {
380-
return functions(functionNames);
381-
}
382-
383-
/**
384-
* @deprecated use {@link #function(String)} instead.
385-
*/
386-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
387-
public Builder withFunction(String functionName) {
388-
return function(functionName);
389-
}
390-
391-
/**
392-
* @deprecated use {@link #proxyToolCalls(Boolean)} instead.
393-
*/
394-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
395-
public Builder withProxyToolCalls(Boolean proxyToolCalls) {
396-
return proxyToolCalls(proxyToolCalls);
397-
}
398-
399-
/**
400-
* @deprecated use {@link #toolContext(Map)} instead.
401-
*/
402-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
403-
public Builder withToolContext(Map<String, Object> toolContext) {
404-
return toolContext(toolContext);
405-
}
406-
407303
public AnthropicChatOptions build() {
408304
return this.options;
409305
}

models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiAudioTranscriptionOptions.java

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -302,69 +302,6 @@ public Builder granularityType(List<GranularityType> granularityType) {
302302
return this;
303303
}
304304

305-
/**
306-
* @deprecated use {@link #model(String)} instead.
307-
*/
308-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
309-
public Builder withModel(String model) {
310-
this.options.model = model;
311-
return this;
312-
}
313-
314-
/**
315-
* @deprecated use {@link #deploymentName(String)} instead.
316-
*/
317-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
318-
public Builder withDeploymentName(String deploymentName) {
319-
this.options.setDeploymentName(deploymentName);
320-
return this;
321-
}
322-
323-
/**
324-
* @deprecated use {@link #language(String)} instead.
325-
*/
326-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
327-
public Builder withLanguage(String language) {
328-
this.options.language = language;
329-
return this;
330-
}
331-
332-
/**
333-
* @deprecated use {@link #prompt(String)} instead.
334-
*/
335-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
336-
public Builder withPrompt(String prompt) {
337-
this.options.prompt = prompt;
338-
return this;
339-
}
340-
341-
/**
342-
* @deprecated use {@link #responseFormat(TranscriptResponseFormat)} instead.
343-
*/
344-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
345-
public Builder withResponseFormat(TranscriptResponseFormat responseFormat) {
346-
this.options.responseFormat = responseFormat;
347-
return this;
348-
}
349-
350-
/**
351-
* @deprecated use {@link #temperature(Float)} instead.
352-
*/
353-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
354-
public Builder withTemperature(Float temperature) {
355-
this.options.temperature = temperature;
356-
return this;
357-
}
358-
359-
/**
360-
* @deprecated use {@link #granularityType(List)} instead.
361-
*/
362-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
363-
public Builder withGranularityType(List<GranularityType> granularityType) {
364-
this.options.granularityType = granularityType;
365-
return this;
366-
}
367-
368305
public AzureOpenAiAudioTranscriptionOptions build() {
369306
Assert.hasText(this.options.model, "model must not be empty");
370307
Assert.notNull(this.options.responseFormat, "response_format must not be null");

models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiChatOptions.java

Lines changed: 0 additions & 197 deletions
Original file line numberDiff line numberDiff line change
@@ -555,203 +555,6 @@ public Builder streamOptions(ChatCompletionStreamOptions streamOptions) {
555555
return this;
556556
}
557557

558-
/**
559-
* @deprecated use {@link #deploymentName(String)} instead.
560-
*/
561-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
562-
public Builder withDeploymentName(String deploymentName) {
563-
this.options.deploymentName = deploymentName;
564-
return this;
565-
}
566-
567-
/**
568-
* @deprecated use {@link #frequencyPenalty(Double)} instead.
569-
*/
570-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
571-
public Builder withFrequencyPenalty(Double frequencyPenalty) {
572-
this.options.frequencyPenalty = frequencyPenalty;
573-
return this;
574-
}
575-
576-
/**
577-
* @deprecated use {@link #logitBias(Map)} instead.
578-
*/
579-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
580-
public Builder withLogitBias(Map<String, Integer> logitBias) {
581-
this.options.logitBias = logitBias;
582-
return this;
583-
}
584-
585-
/**
586-
* @deprecated use {@link #maxTokens(Integer)} instead.
587-
*/
588-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
589-
public Builder withMaxTokens(Integer maxTokens) {
590-
this.options.maxTokens = maxTokens;
591-
return this;
592-
}
593-
594-
/**
595-
* @deprecated use {@link #N(Integer)} instead.
596-
*/
597-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
598-
public Builder withN(Integer n) {
599-
this.options.n = n;
600-
return this;
601-
}
602-
603-
/**
604-
* @deprecated use {@link #presencePenalty(Double)} instead.
605-
*/
606-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
607-
public Builder withPresencePenalty(Double presencePenalty) {
608-
this.options.presencePenalty = presencePenalty;
609-
return this;
610-
}
611-
612-
/**
613-
* @deprecated use {@link #stop(List)} instead.
614-
*/
615-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
616-
public Builder withStop(List<String> stop) {
617-
this.options.stop = stop;
618-
return this;
619-
}
620-
621-
/**
622-
* @deprecated use {@link #temperature(Double)} instead.
623-
*/
624-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
625-
public Builder withTemperature(Double temperature) {
626-
this.options.temperature = temperature;
627-
return this;
628-
}
629-
630-
/**
631-
* @deprecated use {@link #topP(Double)} instead.
632-
*/
633-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
634-
public Builder withTopP(Double topP) {
635-
this.options.topP = topP;
636-
return this;
637-
}
638-
639-
/**
640-
* @deprecated use {@link #user(String)} instead.
641-
*/
642-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
643-
public Builder withUser(String user) {
644-
this.options.user = user;
645-
return this;
646-
}
647-
648-
/**
649-
* @deprecated use {@link #functionCallbacks(List)} instead.
650-
*/
651-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
652-
public Builder withFunctionCallbacks(List<FunctionCallback> functionCallbacks) {
653-
this.options.functionCallbacks = functionCallbacks;
654-
return this;
655-
}
656-
657-
/**
658-
* @deprecated use {@link #functions(Set)} instead.
659-
*/
660-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
661-
public Builder withFunctions(Set<String> functionNames) {
662-
Assert.notNull(functionNames, "Function names must not be null");
663-
this.options.functions = functionNames;
664-
return this;
665-
}
666-
667-
/**
668-
* @deprecated use {@link #function(String)} instead.
669-
*/
670-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
671-
public Builder withFunction(String functionName) {
672-
Assert.hasText(functionName, "Function name must not be empty");
673-
this.options.functions.add(functionName);
674-
return this;
675-
}
676-
677-
/**
678-
* @deprecated use {@link #responseFormat(AzureOpenAiResponseFormat)} instead.
679-
*/
680-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
681-
public Builder withResponseFormat(AzureOpenAiResponseFormat responseFormat) {
682-
this.options.responseFormat = responseFormat;
683-
return this;
684-
}
685-
686-
/**
687-
* @deprecated use {@link #proxyToolCalls(Boolean)} instead.
688-
*/
689-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
690-
public Builder withProxyToolCalls(Boolean proxyToolCalls) {
691-
this.options.proxyToolCalls = proxyToolCalls;
692-
return this;
693-
}
694-
695-
/**
696-
* @deprecated use {@link #seed(Long)} instead.
697-
*/
698-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
699-
public Builder withSeed(Long seed) {
700-
this.options.seed = seed;
701-
return this;
702-
}
703-
704-
/**
705-
* @deprecated use {@link #logprobs(Boolean)} instead.
706-
*/
707-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
708-
public Builder withLogprobs(Boolean logprobs) {
709-
this.options.logprobs = logprobs;
710-
return this;
711-
}
712-
713-
/**
714-
* @deprecated use {@link #topLogprobs(Integer)} instead.
715-
*/
716-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
717-
public Builder withTopLogprobs(Integer topLogprobs) {
718-
this.options.topLogProbs = topLogprobs;
719-
return this;
720-
}
721-
722-
/**
723-
* @deprecated use {@link #enhancements(AzureChatEnhancementConfiguration)} )}
724-
* instead.
725-
*/
726-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
727-
public Builder withEnhancements(AzureChatEnhancementConfiguration enhancements) {
728-
this.options.enhancements = enhancements;
729-
return this;
730-
}
731-
732-
/**
733-
* @deprecated use {@link #toolContext(Map)} instead.
734-
*/
735-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
736-
public Builder withToolContext(Map<String, Object> toolContext) {
737-
if (this.options.toolContext == null) {
738-
this.options.toolContext = toolContext;
739-
}
740-
else {
741-
this.options.toolContext.putAll(toolContext);
742-
}
743-
return this;
744-
}
745-
746-
/**
747-
* @deprecated use {@link #streamOptions(ChatCompletionStreamOptions)} instead.
748-
*/
749-
@Deprecated(forRemoval = true, since = "1.0.0-M5")
750-
public Builder withStreamOptions(ChatCompletionStreamOptions streamOptions) {
751-
this.options.streamOptions = streamOptions;
752-
return this;
753-
}
754-
755558
public AzureOpenAiChatOptions build() {
756559
return this.options;
757560
}

0 commit comments

Comments
 (0)