From c54dfd35d553506e388b59c99aaa36b26a401f79 Mon Sep 17 00:00:00 2001 From: GR Date: Thu, 8 May 2025 10:07:24 +0800 Subject: [PATCH] feat: add deepseek starter and docs - fix pom module ordering - Add remaining deepseek modules - Fix build order to put autoconfig modules after model modules to fix javadoc build Signed-off-by: GR --- .../pom.xml | 96 +++++ .../DeepSeekChatAutoConfiguration.java | 115 ++++++ .../autoconfigure/DeepSeekChatProperties.java | 89 +++++ .../DeepSeekConnectionProperties.java | 37 ++ .../DeepSeekParentProperties.java | 46 +++ ...ot.autoconfigure.AutoConfiguration.imports | 16 + .../DeepSeekAutoConfigurationIT.java | 76 ++++ .../DeepSeekPropertiesTests.java | 158 ++++++++ .../tool/DeepSeekFunctionCallbackIT.java | 126 +++++++ .../tool/FunctionCallbackInPromptIT.java | 114 ++++++ ...nctionCallbackWithPlainFunctionBeanIT.java | 174 +++++++++ .../tool/MockWeatherService.java | 95 +++++ pom.xml | 118 +++--- spring-ai-bom/pom.xml | 18 + .../images/deepseek_r1_multiround_example.png | Bin 0 -> 51483 bytes .../src/main/antora/modules/ROOT/nav.adoc | 2 +- .../ROOT/pages/api/chat/deepseek-chat.adoc | 347 +++++++++++------- .../ai/model/SpringAIModels.java | 2 + .../spring-ai-starter-model-deepseek/pom.xml | 70 ++++ 19 files changed, 1518 insertions(+), 181 deletions(-) create mode 100644 auto-configurations/models/spring-ai-autoconfigure-model-deepseek/pom.xml create mode 100644 auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekChatAutoConfiguration.java create mode 100644 auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekChatProperties.java create mode 100644 auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekConnectionProperties.java create mode 100644 auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekParentProperties.java create mode 100644 auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekAutoConfigurationIT.java create mode 100644 auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekPropertiesTests.java create mode 100644 auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/DeepSeekFunctionCallbackIT.java create mode 100644 auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/FunctionCallbackInPromptIT.java create mode 100644 auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/FunctionCallbackWithPlainFunctionBeanIT.java create mode 100644 auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/MockWeatherService.java create mode 100644 spring-ai-docs/src/main/antora/modules/ROOT/images/deepseek_r1_multiround_example.png create mode 100644 spring-ai-spring-boot-starters/spring-ai-starter-model-deepseek/pom.xml diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/pom.xml b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/pom.xml new file mode 100644 index 000000000..bb4f5c762 --- /dev/null +++ b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/pom.xml @@ -0,0 +1,96 @@ + + + 4.0.0 + + org.springframework.ai + spring-ai-parent + 1.0.0-SNAPSHOT + ../../../pom.xml + + spring-ai-autoconfigure-model-deepseek + jar + Spring AI DeepSeek Auto Configuration + Spring AI DeepSeek Auto Configuration + https://github.com/spring-projects/spring-ai + + + https://github.com/spring-projects/spring-ai + git://github.com/spring-projects/spring-ai.git + git@github.com:spring-projects/spring-ai.git + + + + + + + + + org.springframework.ai + spring-ai-deepseek + ${project.parent.version} + true + + + + + + org.springframework.ai + spring-ai-autoconfigure-model-tool + ${project.parent.version} + + + + org.springframework.ai + spring-ai-autoconfigure-retry + ${project.parent.version} + + + + org.springframework.ai + spring-ai-autoconfigure-model-chat-observation + ${project.parent.version} + + + + + org.springframework.boot + spring-boot-starter + true + + + + org.springframework.boot + spring-boot-configuration-processor + true + + + + org.springframework.boot + spring-boot-autoconfigure-processor + true + + + + + org.springframework.ai + spring-ai-test + ${project.parent.version} + test + + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.mockito + mockito-core + test + + + + diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekChatAutoConfiguration.java b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekChatAutoConfiguration.java new file mode 100644 index 000000000..59507a46c --- /dev/null +++ b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekChatAutoConfiguration.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ai.model.deepseek.autoconfigure; + +import io.micrometer.observation.ObservationRegistry; +import org.springframework.ai.chat.observation.ChatModelObservationConvention; +import org.springframework.ai.model.SimpleApiKey; +import org.springframework.ai.deepseek.DeepSeekChatModel; +import org.springframework.ai.deepseek.api.DeepSeekApi; +import org.springframework.ai.model.SpringAIModelProperties; +import org.springframework.ai.model.SpringAIModels; +import org.springframework.ai.model.tool.DefaultToolExecutionEligibilityPredicate; +import org.springframework.ai.model.tool.ToolCallingManager; +import org.springframework.ai.model.tool.ToolExecutionEligibilityPredicate; +import org.springframework.ai.model.tool.autoconfigure.ToolCallingAutoConfiguration; +import org.springframework.ai.retry.autoconfigure.SpringAiRetryAutoConfiguration; +import org.springframework.beans.factory.ObjectProvider; +import org.springframework.boot.autoconfigure.AutoConfiguration; +import org.springframework.boot.autoconfigure.ImportAutoConfiguration; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration; +import org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.retry.support.RetryTemplate; +import org.springframework.util.Assert; +import org.springframework.util.StringUtils; +import org.springframework.web.client.ResponseErrorHandler; +import org.springframework.web.client.RestClient; +import org.springframework.web.reactive.function.client.WebClient; + +/** + * {@link AutoConfiguration Auto-configuration} for DeepSeek Chat Model. + * + * @author Geng Rong + */ +@AutoConfiguration(after = { RestClientAutoConfiguration.class, WebClientAutoConfiguration.class, + SpringAiRetryAutoConfiguration.class, ToolCallingAutoConfiguration.class }) +@ConditionalOnClass(DeepSeekApi.class) +@EnableConfigurationProperties({ DeepSeekConnectionProperties.class, DeepSeekChatProperties.class }) +@ConditionalOnProperty(name = SpringAIModelProperties.CHAT_MODEL, havingValue = SpringAIModels.DEEPSEEK, + matchIfMissing = true) +@ImportAutoConfiguration(classes = { SpringAiRetryAutoConfiguration.class, RestClientAutoConfiguration.class, + WebClientAutoConfiguration.class, ToolCallingAutoConfiguration.class }) +public class DeepSeekChatAutoConfiguration { + + @Bean + @ConditionalOnMissingBean + public DeepSeekChatModel deepSeekChatModel(DeepSeekConnectionProperties commonProperties, + DeepSeekChatProperties chatProperties, ObjectProvider restClientBuilderProvider, + ObjectProvider webClientBuilderProvider, ToolCallingManager toolCallingManager, + RetryTemplate retryTemplate, ResponseErrorHandler responseErrorHandler, + ObjectProvider observationRegistry, + ObjectProvider observationConvention, + ObjectProvider deepseekToolExecutionEligibilityPredicate) { + + var deepSeekApi = deepSeekApi(chatProperties, commonProperties, + restClientBuilderProvider.getIfAvailable(RestClient::builder), + webClientBuilderProvider.getIfAvailable(WebClient::builder), responseErrorHandler); + + var chatModel = DeepSeekChatModel.builder() + .deepSeekApi(deepSeekApi) + .defaultOptions(chatProperties.getOptions()) + .toolCallingManager(toolCallingManager) + .toolExecutionEligibilityPredicate(deepseekToolExecutionEligibilityPredicate + .getIfUnique(DefaultToolExecutionEligibilityPredicate::new)) + .retryTemplate(retryTemplate) + .observationRegistry(observationRegistry.getIfUnique(() -> ObservationRegistry.NOOP)) + .build(); + + observationConvention.ifAvailable(chatModel::setObservationConvention); + + return chatModel; + } + + private DeepSeekApi deepSeekApi(DeepSeekChatProperties chatProperties, + DeepSeekConnectionProperties commonProperties, RestClient.Builder restClientBuilder, + WebClient.Builder webClientBuilder, ResponseErrorHandler responseErrorHandler) { + + String resolvedBaseUrl = StringUtils.hasText(chatProperties.getBaseUrl()) ? chatProperties.getBaseUrl() + : commonProperties.getBaseUrl(); + Assert.hasText(resolvedBaseUrl, "DeepSeek base URL must be set"); + + String resolvedApiKey = StringUtils.hasText(chatProperties.getApiKey()) ? chatProperties.getApiKey() + : commonProperties.getApiKey(); + Assert.hasText(resolvedApiKey, "DeepSeek API key must be set"); + + return DeepSeekApi.builder() + .baseUrl(resolvedBaseUrl) + .apiKey(new SimpleApiKey(resolvedApiKey)) + .completionsPath(chatProperties.getCompletionsPath()) + .betaPrefixPath(chatProperties.getBetaPrefixPath()) + .restClientBuilder(restClientBuilder) + .webClientBuilder(webClientBuilder) + .responseErrorHandler(responseErrorHandler) + .build(); + } + +} diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekChatProperties.java b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekChatProperties.java new file mode 100644 index 000000000..df48de3e7 --- /dev/null +++ b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekChatProperties.java @@ -0,0 +1,89 @@ +/* + * Copyright 2023-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ai.model.deepseek.autoconfigure; + +import org.springframework.ai.deepseek.DeepSeekChatOptions; +import org.springframework.ai.deepseek.api.DeepSeekApi; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; + +/** + * Configuration properties for DeepSeek chat client. + * + * @author Geng Rong + */ +@ConfigurationProperties(DeepSeekChatProperties.CONFIG_PREFIX) +public class DeepSeekChatProperties extends DeepSeekParentProperties { + + public static final String CONFIG_PREFIX = "spring.ai.deepseek.chat"; + + public static final String DEFAULT_CHAT_MODEL = DeepSeekApi.ChatModel.DEEPSEEK_CHAT.getValue(); + + private static final Double DEFAULT_TEMPERATURE = 1D; + + public static final String DEFAULT_COMPLETIONS_PATH = "/chat/completions"; + + public static final String DEFAULT_BETA_PREFIX_PATH = "/beta"; + + /** + * Enable DeepSeek chat client. + */ + private boolean enabled = true; + + private String completionsPath = DEFAULT_COMPLETIONS_PATH; + + private String betaPrefixPath = DEFAULT_BETA_PREFIX_PATH; + + @NestedConfigurationProperty + private DeepSeekChatOptions options = DeepSeekChatOptions.builder() + .model(DEFAULT_CHAT_MODEL) + .temperature(DEFAULT_TEMPERATURE) + .build(); + + public DeepSeekChatOptions getOptions() { + return this.options; + } + + public void setOptions(DeepSeekChatOptions options) { + this.options = options; + } + + public boolean isEnabled() { + return this.enabled; + } + + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + + public String getCompletionsPath() { + return completionsPath; + } + + public void setCompletionsPath(String completionsPath) { + this.completionsPath = completionsPath; + } + + public String getBetaPrefixPath() { + return betaPrefixPath; + } + + public void setBetaPrefixPath(String betaPrefixPath) { + this.betaPrefixPath = betaPrefixPath; + } + +} diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekConnectionProperties.java b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekConnectionProperties.java new file mode 100644 index 000000000..25deeedf7 --- /dev/null +++ b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekConnectionProperties.java @@ -0,0 +1,37 @@ +/* + * Copyright 2023-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ai.model.deepseek.autoconfigure; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Parent properties for DeepSeek. + * + * @author Geng Rong + */ +@ConfigurationProperties(DeepSeekConnectionProperties.CONFIG_PREFIX) +public class DeepSeekConnectionProperties extends DeepSeekParentProperties { + + public static final String CONFIG_PREFIX = "spring.ai.deepseek"; + + public static final String DEFAULT_BASE_URL = "https://api.deepseek.com"; + + public DeepSeekConnectionProperties() { + super.setBaseUrl(DEFAULT_BASE_URL); + } + +} diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekParentProperties.java b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekParentProperties.java new file mode 100644 index 000000000..0e2695059 --- /dev/null +++ b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekParentProperties.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ai.model.deepseek.autoconfigure; + +/** + * Parent properties for DeepSeek. + * + * @author Geng Rong + */ +public class DeepSeekParentProperties { + + private String apiKey; + + private String baseUrl; + + public String getApiKey() { + return this.apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getBaseUrl() { + return this.baseUrl; + } + + public void setBaseUrl(String baseUrl) { + this.baseUrl = baseUrl; + } + +} diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 000000000..b6c2be166 --- /dev/null +++ b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1,16 @@ +# +# Copyright 2025-2025 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +org.springframework.ai.model.deepseek.autoconfigure.DeepSeekChatAutoConfiguration diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekAutoConfigurationIT.java b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekAutoConfigurationIT.java new file mode 100644 index 000000000..a433f5584 --- /dev/null +++ b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekAutoConfigurationIT.java @@ -0,0 +1,76 @@ +/* + * Copyright 2023-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ai.model.deepseek.autoconfigure; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; +import org.springframework.ai.chat.messages.UserMessage; +import org.springframework.ai.chat.model.ChatResponse; +import org.springframework.ai.chat.prompt.Prompt; +import org.springframework.ai.deepseek.DeepSeekChatModel; +import org.springframework.ai.retry.autoconfigure.SpringAiRetryAutoConfiguration; +import org.springframework.boot.autoconfigure.AutoConfigurations; +import org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration; +import org.springframework.boot.test.context.runner.ApplicationContextRunner; +import reactor.core.publisher.Flux; + +import java.util.Objects; +import java.util.stream.Collectors; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * @author Geng Rong + */ +@EnabledIfEnvironmentVariable(named = "DEEPSEEK_API_KEY", matches = ".*") +public class DeepSeekAutoConfigurationIT { + + private static final Log logger = LogFactory.getLog(DeepSeekAutoConfigurationIT.class); + + private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() + .withPropertyValues("spring.ai.deepseek.apiKey=" + System.getenv("DEEPSEEK_API_KEY")) + .withConfiguration(AutoConfigurations.of(SpringAiRetryAutoConfiguration.class, + RestClientAutoConfiguration.class, DeepSeekChatAutoConfiguration.class)); + + @Test + void generate() { + this.contextRunner.run(context -> { + DeepSeekChatModel client = context.getBean(DeepSeekChatModel.class); + String response = client.call("Hello"); + assertThat(response).isNotEmpty(); + logger.info("Response: " + response); + }); + } + + @Test + void generateStreaming() { + this.contextRunner.run(context -> { + DeepSeekChatModel client = context.getBean(DeepSeekChatModel.class); + Flux responseFlux = client.stream(new Prompt(new UserMessage("Hello"))); + String response = Objects.requireNonNull(responseFlux.collectList().block()) + .stream() + .map(chatResponse -> chatResponse.getResults().get(0).getOutput().getText()) + .collect(Collectors.joining()); + + assertThat(response).isNotEmpty(); + logger.info("Response: " + response); + }); + } + +} diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekPropertiesTests.java b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekPropertiesTests.java new file mode 100644 index 000000000..01d3fa300 --- /dev/null +++ b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/DeepSeekPropertiesTests.java @@ -0,0 +1,158 @@ +/* + * Copyright 2023-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ai.model.deepseek.autoconfigure; + +import org.junit.jupiter.api.Test; +import org.springframework.ai.deepseek.DeepSeekChatModel; +import org.springframework.ai.retry.autoconfigure.SpringAiRetryAutoConfiguration; +import org.springframework.boot.autoconfigure.AutoConfigurations; +import org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration; +import org.springframework.boot.test.context.runner.ApplicationContextRunner; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * @author Geng Rong + */ +public class DeepSeekPropertiesTests { + + @Test + public void chatProperties() { + + new ApplicationContextRunner().withPropertyValues( + // @formatter:off + "spring.ai.deepseek.base-url=TEST_BASE_URL", + "spring.ai.deepseek.api-key=abc123", + "spring.ai.deepseek.chat.options.model=MODEL_XYZ", + "spring.ai.deepseek.chat.options.temperature=0.55") + // @formatter:on + .withConfiguration(AutoConfigurations.of(SpringAiRetryAutoConfiguration.class, + RestClientAutoConfiguration.class, DeepSeekChatAutoConfiguration.class)) + .run(context -> { + var chatProperties = context.getBean(DeepSeekChatProperties.class); + var connectionProperties = context.getBean(DeepSeekConnectionProperties.class); + + assertThat(connectionProperties.getApiKey()).isEqualTo("abc123"); + assertThat(connectionProperties.getBaseUrl()).isEqualTo("TEST_BASE_URL"); + + assertThat(chatProperties.getApiKey()).isNull(); + assertThat(chatProperties.getBaseUrl()).isNull(); + + assertThat(chatProperties.getOptions().getModel()).isEqualTo("MODEL_XYZ"); + assertThat(chatProperties.getOptions().getTemperature()).isEqualTo(0.55); + }); + } + + @Test + public void chatOverrideConnectionProperties() { + + new ApplicationContextRunner().withPropertyValues( + // @formatter:off + "spring.ai.deepseek.base-url=TEST_BASE_URL", + "spring.ai.deepseek.api-key=abc123", + "spring.ai.deepseek.chat.base-url=TEST_BASE_URL2", + "spring.ai.deepseek.chat.api-key=456", + "spring.ai.deepseek.chat.options.model=MODEL_XYZ", + "spring.ai.deepseek.chat.options.temperature=0.55") + // @formatter:on + .withConfiguration(AutoConfigurations.of(SpringAiRetryAutoConfiguration.class, + RestClientAutoConfiguration.class, DeepSeekChatAutoConfiguration.class)) + .run(context -> { + var chatProperties = context.getBean(DeepSeekChatProperties.class); + var connectionProperties = context.getBean(DeepSeekConnectionProperties.class); + + assertThat(connectionProperties.getApiKey()).isEqualTo("abc123"); + assertThat(connectionProperties.getBaseUrl()).isEqualTo("TEST_BASE_URL"); + + assertThat(chatProperties.getApiKey()).isEqualTo("456"); + assertThat(chatProperties.getBaseUrl()).isEqualTo("TEST_BASE_URL2"); + + assertThat(chatProperties.getOptions().getModel()).isEqualTo("MODEL_XYZ"); + assertThat(chatProperties.getOptions().getTemperature()).isEqualTo(0.55); + }); + } + + @Test + public void chatOptionsTest() { + + new ApplicationContextRunner().withPropertyValues( + // @formatter:off + "spring.ai.deepseek.api-key=API_KEY", + "spring.ai.deepseek.base-url=TEST_BASE_URL", + + "spring.ai.deepseek.chat.options.model=MODEL_XYZ", + "spring.ai.deepseek.chat.options.frequencyPenalty=-1.5", + "spring.ai.deepseek.chat.options.logitBias.myTokenId=-5", + "spring.ai.deepseek.chat.options.maxTokens=123", + "spring.ai.deepseek.chat.options.presencePenalty=0", + "spring.ai.deepseek.chat.options.responseFormat.type=json_object", + "spring.ai.deepseek.chat.options.seed=66", + "spring.ai.deepseek.chat.options.stop=boza,koza", + "spring.ai.deepseek.chat.options.temperature=0.55", + "spring.ai.deepseek.chat.options.topP=0.56", + "spring.ai.deepseek.chat.options.user=userXYZ" + ) + // @formatter:on + .withConfiguration(AutoConfigurations.of(SpringAiRetryAutoConfiguration.class, + RestClientAutoConfiguration.class, DeepSeekChatAutoConfiguration.class)) + .run(context -> { + var chatProperties = context.getBean(DeepSeekChatProperties.class); + var connectionProperties = context.getBean(DeepSeekConnectionProperties.class); + + assertThat(connectionProperties.getBaseUrl()).isEqualTo("TEST_BASE_URL"); + assertThat(connectionProperties.getApiKey()).isEqualTo("API_KEY"); + + assertThat(chatProperties.getOptions().getModel()).isEqualTo("MODEL_XYZ"); + assertThat(chatProperties.getOptions().getFrequencyPenalty()).isEqualTo(-1.5); + assertThat(chatProperties.getOptions().getMaxTokens()).isEqualTo(123); + assertThat(chatProperties.getOptions().getPresencePenalty()).isEqualTo(0); + assertThat(chatProperties.getOptions().getStop()).contains("boza", "koza"); + assertThat(chatProperties.getOptions().getTemperature()).isEqualTo(0.55); + assertThat(chatProperties.getOptions().getTopP()).isEqualTo(0.56); + }); + } + + @Test + void chatActivation() { + new ApplicationContextRunner() + .withPropertyValues("spring.ai.deepseek.api-key=API_KEY", "spring.ai.deepseek.base-url=TEST_BASE_URL", + "spring.ai.model.chat=none") + .withConfiguration(AutoConfigurations.of(DeepSeekChatAutoConfiguration.class)) + .run(context -> { + assertThat(context.getBeansOfType(DeepSeekChatProperties.class)).isEmpty(); + assertThat(context.getBeansOfType(DeepSeekChatModel.class)).isEmpty(); + }); + + new ApplicationContextRunner() + .withPropertyValues("spring.ai.deepseek.api-key=API_KEY", "spring.ai.deepseek.base-url=TEST_BASE_URL") + .withConfiguration(AutoConfigurations.of(DeepSeekChatAutoConfiguration.class)) + .run(context -> { + assertThat(context.getBeansOfType(DeepSeekChatProperties.class)).isNotEmpty(); + assertThat(context.getBeansOfType(DeepSeekChatModel.class)).isNotEmpty(); + }); + + new ApplicationContextRunner() + .withPropertyValues("spring.ai.deepseek.api-key=API_KEY", "spring.ai.deepseek.base-url=TEST_BASE_URL", + "spring.ai.model.chat=deepseek") + .withConfiguration(AutoConfigurations.of(DeepSeekChatAutoConfiguration.class)) + .run(context -> { + assertThat(context.getBeansOfType(DeepSeekChatProperties.class)).isNotEmpty(); + assertThat(context.getBeansOfType(DeepSeekChatModel.class)).isNotEmpty(); + }); + } + +} diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/DeepSeekFunctionCallbackIT.java b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/DeepSeekFunctionCallbackIT.java new file mode 100644 index 000000000..bd4fa9185 --- /dev/null +++ b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/DeepSeekFunctionCallbackIT.java @@ -0,0 +1,126 @@ +/* + * Copyright 2023-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ai.model.deepseek.autoconfigure.tool; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.ai.chat.messages.AssistantMessage; +import org.springframework.ai.chat.messages.UserMessage; +import org.springframework.ai.chat.model.ChatResponse; +import org.springframework.ai.chat.model.Generation; +import org.springframework.ai.chat.prompt.Prompt; +import org.springframework.ai.deepseek.DeepSeekChatModel; +import org.springframework.ai.deepseek.DeepSeekChatOptions; +import org.springframework.ai.model.deepseek.autoconfigure.DeepSeekChatAutoConfiguration; +import org.springframework.ai.retry.autoconfigure.SpringAiRetryAutoConfiguration; +import org.springframework.ai.tool.ToolCallback; +import org.springframework.ai.tool.function.FunctionToolCallback; +import org.springframework.boot.autoconfigure.AutoConfigurations; +import org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration; +import org.springframework.boot.test.context.runner.ApplicationContextRunner; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import reactor.core.publisher.Flux; + +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * @author Geng Rong + */ +// @Disabled("the deepseek-chat model's Function Calling capability is unstable see: +// https://api-docs.deepseek.com/guides/function_calling") +@EnabledIfEnvironmentVariable(named = "DEEPSEEK_API_KEY", matches = ".*") +public class DeepSeekFunctionCallbackIT { + + private final Logger logger = LoggerFactory.getLogger(DeepSeekFunctionCallbackIT.class); + + private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() + .withPropertyValues("spring.ai.deepseek.apiKey=" + System.getenv("DEEPSEEK_API_KEY")) + .withConfiguration(AutoConfigurations.of(SpringAiRetryAutoConfiguration.class, + RestClientAutoConfiguration.class, DeepSeekChatAutoConfiguration.class)) + .withUserConfiguration(Config.class); + + @Test + void functionCallTest() { + this.contextRunner.run(context -> { + + DeepSeekChatModel chatModel = context.getBean(DeepSeekChatModel.class); + + UserMessage userMessage = new UserMessage( + "What's the weather like in San Francisco, Tokyo, and Paris? Return the temperature in Celsius"); + + ChatResponse response = chatModel + .call(new Prompt(List.of(userMessage), DeepSeekChatOptions.builder().toolNames("WeatherInfo").build())); + + logger.info("Response: {}", response); + + assertThat(response.getResult().getOutput().getText()).contains("30", "10", "15"); + + }); + } + + @Test + void streamFunctionCallTest() { + this.contextRunner.run(context -> { + + DeepSeekChatModel chatModel = context.getBean(DeepSeekChatModel.class); + + UserMessage userMessage = new UserMessage( + "What's the weather like in San Francisco, Tokyo, and Paris? Return the temperature in Celsius"); + + Flux response = chatModel.stream( + new Prompt(List.of(userMessage), DeepSeekChatOptions.builder().toolNames("WeatherInfo").build())); + + String content = response.collectList() + .block() + .stream() + .map(ChatResponse::getResults) + .flatMap(List::stream) + .map(Generation::getOutput) + .map(AssistantMessage::getText) + .filter(Objects::nonNull) + .collect(Collectors.joining()); + logger.info("Response: {}", content); + + assertThat(content).containsAnyOf("30.0", "30"); + assertThat(content).containsAnyOf("10.0", "10"); + assertThat(content).containsAnyOf("15.0", "15"); + + }); + } + + @Configuration + static class Config { + + @Bean + public ToolCallback weatherFunctionInfo() { + + return FunctionToolCallback.builder("WeatherInfo", new MockWeatherService()) + .description("Get the weather in location") + .inputType(MockWeatherService.Request.class) + .build(); + } + + } + +} diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/FunctionCallbackInPromptIT.java b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/FunctionCallbackInPromptIT.java new file mode 100644 index 000000000..47f750e39 --- /dev/null +++ b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/FunctionCallbackInPromptIT.java @@ -0,0 +1,114 @@ +/* + * Copyright 2023-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ai.model.deepseek.autoconfigure.tool; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.ai.chat.messages.AssistantMessage; +import org.springframework.ai.chat.messages.UserMessage; +import org.springframework.ai.chat.model.ChatResponse; +import org.springframework.ai.chat.model.Generation; +import org.springframework.ai.chat.prompt.Prompt; +import org.springframework.ai.deepseek.DeepSeekChatModel; +import org.springframework.ai.deepseek.DeepSeekChatOptions; +import org.springframework.ai.model.deepseek.autoconfigure.DeepSeekChatAutoConfiguration; +import org.springframework.ai.tool.function.FunctionToolCallback; +import org.springframework.boot.autoconfigure.AutoConfigurations; +import org.springframework.boot.test.context.runner.ApplicationContextRunner; +import reactor.core.publisher.Flux; + +import java.util.List; +import java.util.stream.Collectors; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * @author Geng Rong + */ +// @Disabled("the deepseek-chat model's Function Calling capability is unstable see: +// https://api-docs.deepseek.com/guides/function_calling") +@EnabledIfEnvironmentVariable(named = "DEEPSEEK_API_KEY", matches = ".*") +public class FunctionCallbackInPromptIT { + + private final Logger logger = LoggerFactory.getLogger(FunctionCallbackInPromptIT.class); + + private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() + .withPropertyValues("spring.ai.deepseek.apiKey=" + System.getenv("DEEPSEEK_API_KEY")) + .withConfiguration(AutoConfigurations.of(DeepSeekChatAutoConfiguration.class)); + + @Test + void functionCallTest() { + this.contextRunner.run(context -> { + + DeepSeekChatModel chatModel = context.getBean(DeepSeekChatModel.class); + + UserMessage userMessage = new UserMessage( + "What's the weather like in San Francisco, Tokyo, and Paris? Return the temperature in Celsius"); + + var promptOptions = DeepSeekChatOptions.builder() + .toolCallbacks(List.of(FunctionToolCallback.builder("CurrentWeatherService", new MockWeatherService()) + .description("Get the weather in location") + .inputType(MockWeatherService.Request.class) + .build())) + .build(); + + ChatResponse response = chatModel.call(new Prompt(List.of(userMessage), promptOptions)); + + logger.info("Response: {}", response); + + assertThat(response.getResult().getOutput().getText()).contains("30", "10", "15"); + }); + } + + @Test + void streamingFunctionCallTest() { + + this.contextRunner.run(context -> { + + DeepSeekChatModel chatModel = context.getBean(DeepSeekChatModel.class); + + UserMessage userMessage = new UserMessage( + "What's the weather like in San Francisco, Tokyo, and Paris? Return the temperature in Celsius"); + + var promptOptions = DeepSeekChatOptions.builder() + .toolCallbacks(List.of(FunctionToolCallback.builder("CurrentWeatherService", new MockWeatherService()) + .description("Get the weather in location") + .inputType(MockWeatherService.Request.class) + .build())) + .build(); + + Flux response = chatModel.stream(new Prompt(List.of(userMessage), promptOptions)); + + String content = response.collectList() + .block() + .stream() + .map(ChatResponse::getResults) + .flatMap(List::stream) + .map(Generation::getOutput) + .map(AssistantMessage::getText) + .collect(Collectors.joining()); + logger.info("Response: {}", content); + + assertThat(content).containsAnyOf("30.0", "30"); + assertThat(content).containsAnyOf("10.0", "10"); + assertThat(content).containsAnyOf("15.0", "15"); + }); + } + +} diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/FunctionCallbackWithPlainFunctionBeanIT.java b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/FunctionCallbackWithPlainFunctionBeanIT.java new file mode 100644 index 000000000..bcb514bf1 --- /dev/null +++ b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/FunctionCallbackWithPlainFunctionBeanIT.java @@ -0,0 +1,174 @@ +/* + * Copyright 2023-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ai.model.deepseek.autoconfigure.tool; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.ai.chat.messages.AssistantMessage; +import org.springframework.ai.chat.messages.UserMessage; +import org.springframework.ai.chat.model.ChatResponse; +import org.springframework.ai.chat.model.Generation; +import org.springframework.ai.chat.prompt.Prompt; +import org.springframework.ai.deepseek.DeepSeekChatModel; +import org.springframework.ai.deepseek.DeepSeekChatOptions; +import org.springframework.ai.model.deepseek.autoconfigure.DeepSeekChatAutoConfiguration; +import org.springframework.ai.model.tool.ToolCallingChatOptions; +import org.springframework.boot.autoconfigure.AutoConfigurations; +import org.springframework.boot.test.context.runner.ApplicationContextRunner; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Description; +import reactor.core.publisher.Flux; + +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * @author Geng Rong + */ +@EnabledIfEnvironmentVariable(named = "DEEPSEEK_API_KEY", matches = ".*") +// @Disabled("the deepseek-chat model's Function Calling capability is unstable see: +// https://api-docs.deepseek.com/guides/function_calling") +class FunctionCallbackWithPlainFunctionBeanIT { + + private final Logger logger = LoggerFactory.getLogger(FunctionCallbackWithPlainFunctionBeanIT.class); + + private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() + .withPropertyValues("spring.ai.deepseek.apiKey=" + System.getenv("DEEPSEEK_API_KEY")) + .withConfiguration(AutoConfigurations.of(DeepSeekChatAutoConfiguration.class)) + .withUserConfiguration(Config.class); + + @Test + void functionCallTest() { + this.contextRunner.run(context -> { + + DeepSeekChatModel chatModel = context.getBean(DeepSeekChatModel.class); + + // Test weatherFunction + UserMessage userMessage = new UserMessage( + "What's the weather like in San Francisco, Tokyo, and Paris? Return the temperature in Celsius"); + + ChatResponse response = chatModel.call(new Prompt(List.of(userMessage), + DeepSeekChatOptions.builder().toolNames("weatherFunction").build())); + + logger.info("Response: {}", response); + + assertThat(response.getResult().getOutput().getText()).contains("30", "10", "15"); + + // Test weatherFunctionTwo + response = chatModel.call(new Prompt(List.of(userMessage), + DeepSeekChatOptions.builder().toolNames("weatherFunctionTwo").build())); + + logger.info("Response: {}", response); + + assertThat(response.getResult().getOutput().getText()).contains("30", "10", "15"); + + }); + } + + @Test + void functionCallWithPortableFunctionCallingOptions() { + this.contextRunner.run(context -> { + + DeepSeekChatModel chatModel = context.getBean(DeepSeekChatModel.class); + + // Test weatherFunction + UserMessage userMessage = new UserMessage( + "What's the weather like in San Francisco, Tokyo, and Paris? Return the temperature in Celsius"); + + ToolCallingChatOptions functionOptions = ToolCallingChatOptions.builder() + .toolNames("weatherFunction") + .build(); + + ChatResponse response = chatModel.call(new Prompt(List.of(userMessage), functionOptions)); + + logger.info("Response: {}", response); + }); + } + + @Test + void streamFunctionCallTest() { + this.contextRunner.run(context -> { + + DeepSeekChatModel chatModel = context.getBean(DeepSeekChatModel.class); + + // Test weatherFunction + UserMessage userMessage = new UserMessage( + "What's the weather like in San Francisco, Tokyo, and Paris? Return the temperature in Celsius"); + + Flux response = chatModel.stream(new Prompt(List.of(userMessage), + DeepSeekChatOptions.builder().toolNames("weatherFunction").build())); + + String content = response.collectList() + .block() + .stream() + .map(ChatResponse::getResults) + .flatMap(List::stream) + .map(Generation::getOutput) + .map(AssistantMessage::getText) + .collect(Collectors.joining()); + logger.info("Response: {}", content); + + assertThat(content).containsAnyOf("30.0", "30"); + assertThat(content).containsAnyOf("10.0", "10"); + assertThat(content).containsAnyOf("15.0", "15"); + + // Test weatherFunctionTwo + response = chatModel.stream(new Prompt(List.of(userMessage), + DeepSeekChatOptions.builder().toolNames("weatherFunctionTwo").build())); + + content = response.collectList() + .block() + .stream() + .map(ChatResponse::getResults) + .flatMap(List::stream) + .map(Generation::getOutput) + .map(AssistantMessage::getText) + .collect(Collectors.joining()); + logger.info("Response: {}", content); + + assertThat(content).containsAnyOf("30.0", "30"); + assertThat(content).containsAnyOf("10.0", "10"); + assertThat(content).containsAnyOf("15.0", "15"); + }); + } + + @Configuration + static class Config { + + @Bean + @Description("Get the weather in location") + public Function weatherFunction() { + return new MockWeatherService(); + } + + // Relies on the Request's JsonClassDescription annotation to provide the + // function description. + @Bean + public Function weatherFunctionTwo() { + MockWeatherService weatherService = new MockWeatherService(); + return (weatherService::apply); + } + + } + +} diff --git a/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/MockWeatherService.java b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/MockWeatherService.java new file mode 100644 index 000000000..cc8fa2fe5 --- /dev/null +++ b/auto-configurations/models/spring-ai-autoconfigure-model-deepseek/src/test/java/org/springframework/ai/model/deepseek/autoconfigure/tool/MockWeatherService.java @@ -0,0 +1,95 @@ +/* + * Copyright 2023-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ai.model.deepseek.autoconfigure.tool; + +import com.fasterxml.jackson.annotation.JsonClassDescription; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; + +import java.util.function.Function; + +/** + * Mock 3rd party weather service. + * + * @author Geng Rong + */ +public class MockWeatherService implements Function { + + @Override + public Response apply(Request request) { + + double temperature = 0; + if (request.location().contains("Paris")) { + temperature = 15; + } + else if (request.location().contains("Tokyo")) { + temperature = 10; + } + else if (request.location().contains("San Francisco")) { + temperature = 30; + } + + return new Response(temperature, 15, 20, 2, 53, 45, Unit.C); + } + + /** + * Temperature units. + */ + public enum Unit { + + /** + * Celsius. + */ + C("metric"), + /** + * Fahrenheit. + */ + F("imperial"); + + /** + * Human readable unit name. + */ + public final String unitName; + + Unit(String text) { + this.unitName = text; + } + + } + + /** + * Weather Function request. + */ + @JsonInclude(Include.NON_NULL) + @JsonClassDescription("Weather API request") + public record Request(@JsonProperty(required = true, + value = "location") @JsonPropertyDescription("The city and state e.g. San Francisco, CA") String location, + @JsonProperty(required = true, value = "unit") @JsonPropertyDescription("Temperature unit") Unit unit) { + + } + + /** + * Weather Function response. + */ + public record Response(double temp, double feels_like, double temp_min, double temp_max, int pressure, int humidity, + Unit unit) { + + } + +} diff --git a/pom.xml b/pom.xml index 925864714..55ca3e16e 100644 --- a/pom.xml +++ b/pom.xml @@ -45,62 +45,7 @@ memory/spring-ai-model-chat-memory-jdbc memory/spring-ai-model-chat-memory-neo4j - auto-configurations/common/spring-ai-autoconfigure-retry - auto-configurations/models/tool/spring-ai-autoconfigure-model-tool - - auto-configurations/models/chat/client/spring-ai-autoconfigure-model-chat-client - - auto-configurations/models/chat/memory/spring-ai-autoconfigure-model-chat-memory - auto-configurations/models/chat/memory/spring-ai-autoconfigure-model-chat-memory-cassandra - auto-configurations/models/chat/memory/spring-ai-autoconfigure-model-chat-memory-jdbc - auto-configurations/models/chat/memory/spring-ai-autoconfigure-model-chat-memory-neo4j - - auto-configurations/models/chat/observation/spring-ai-autoconfigure-model-chat-observation - - auto-configurations/models/embedding/observation/spring-ai-autoconfigure-model-embedding-observation - auto-configurations/models/image/observation/spring-ai-autoconfigure-model-image-observation - - auto-configurations/models/spring-ai-autoconfigure-model-anthropic - auto-configurations/models/spring-ai-autoconfigure-model-azure-openai - auto-configurations/models/spring-ai-autoconfigure-model-bedrock-ai - auto-configurations/models/spring-ai-autoconfigure-model-huggingface - auto-configurations/models/spring-ai-autoconfigure-model-openai - auto-configurations/models/spring-ai-autoconfigure-model-minimax - auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai - auto-configurations/models/spring-ai-autoconfigure-model-oci-genai - auto-configurations/models/spring-ai-autoconfigure-model-ollama - - auto-configurations/models/spring-ai-autoconfigure-model-postgresml-embedding - auto-configurations/models/spring-ai-autoconfigure-model-stability-ai - auto-configurations/models/spring-ai-autoconfigure-model-transformers - auto-configurations/models/spring-ai-autoconfigure-model-vertex-ai - auto-configurations/models/spring-ai-autoconfigure-model-zhipuai - - auto-configurations/mcp/spring-ai-autoconfigure-mcp-client - auto-configurations/mcp/spring-ai-autoconfigure-mcp-server - - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-azure - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-azure-cosmos-db - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-cassandra - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-chroma - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-couchbase - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-elasticsearch - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-gemfire - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-hanadb - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-mariadb - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-milvus - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-mongodb-atlas - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-neo4j - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-opensearch - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-observation - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-oracle - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-pinecone - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-qdrant - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-redis - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-typesense - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-weaviate - auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-pgvector spring-ai-retry spring-ai-spring-boot-docker-compose @@ -134,6 +79,65 @@ vector-stores/spring-ai-typesense-store vector-stores/spring-ai-weaviate-store + + auto-configurations/common/spring-ai-autoconfigure-retry + + auto-configurations/models/tool/spring-ai-autoconfigure-model-tool + + auto-configurations/models/chat/client/spring-ai-autoconfigure-model-chat-client + + auto-configurations/models/chat/memory/spring-ai-autoconfigure-model-chat-memory + auto-configurations/models/chat/memory/spring-ai-autoconfigure-model-chat-memory-cassandra + auto-configurations/models/chat/memory/spring-ai-autoconfigure-model-chat-memory-jdbc + auto-configurations/models/chat/memory/spring-ai-autoconfigure-model-chat-memory-neo4j + + auto-configurations/models/chat/observation/spring-ai-autoconfigure-model-chat-observation + + auto-configurations/models/embedding/observation/spring-ai-autoconfigure-model-embedding-observation + auto-configurations/models/image/observation/spring-ai-autoconfigure-model-image-observation + + auto-configurations/models/spring-ai-autoconfigure-model-anthropic + auto-configurations/models/spring-ai-autoconfigure-model-azure-openai + auto-configurations/models/spring-ai-autoconfigure-model-bedrock-ai + auto-configurations/models/spring-ai-autoconfigure-model-huggingface + auto-configurations/models/spring-ai-autoconfigure-model-openai + auto-configurations/models/spring-ai-autoconfigure-model-minimax + auto-configurations/models/spring-ai-autoconfigure-model-mistral-ai + auto-configurations/models/spring-ai-autoconfigure-model-oci-genai + auto-configurations/models/spring-ai-autoconfigure-model-ollama + + auto-configurations/models/spring-ai-autoconfigure-model-postgresml-embedding + auto-configurations/models/spring-ai-autoconfigure-model-stability-ai + auto-configurations/models/spring-ai-autoconfigure-model-transformers + auto-configurations/models/spring-ai-autoconfigure-model-vertex-ai + auto-configurations/models/spring-ai-autoconfigure-model-zhipuai + auto-configurations/models/spring-ai-autoconfigure-model-deepseek + + auto-configurations/mcp/spring-ai-autoconfigure-mcp-client + auto-configurations/mcp/spring-ai-autoconfigure-mcp-server + + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-azure + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-azure-cosmos-db + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-cassandra + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-chroma + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-couchbase + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-elasticsearch + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-gemfire + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-hanadb + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-mariadb + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-milvus + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-mongodb-atlas + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-neo4j + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-opensearch + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-observation + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-oracle + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-pinecone + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-qdrant + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-redis + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-typesense + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-weaviate + auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-pgvector + spring-ai-spring-boot-starters/spring-ai-starter-vector-store-aws-opensearch spring-ai-spring-boot-starters/spring-ai-starter-vector-store-azure spring-ai-spring-boot-starters/spring-ai-starter-vector-store-azure-cosmos-db @@ -188,11 +192,12 @@ spring-ai-spring-boot-starters/spring-ai-starter-model-ollama spring-ai-spring-boot-starters/spring-ai-starter-model-openai spring-ai-spring-boot-starters/spring-ai-starter-model-postgresml-embedding - spring-ai-spring-boot-starters/spring-ai-starter-model-stability-ai + spring-ai-spring-boot-starters/spring-ai-starter-model-stability-ai spring-ai-spring-boot-starters/spring-ai-starter-model-transformers spring-ai-spring-boot-starters/spring-ai-starter-model-vertex-ai-embedding spring-ai-spring-boot-starters/spring-ai-starter-model-vertex-ai-gemini spring-ai-spring-boot-starters/spring-ai-starter-model-zhipuai + spring-ai-spring-boot-starters/spring-ai-starter-model-deepseek spring-ai-spring-boot-starters/spring-ai-starter-mcp-client spring-ai-spring-boot-starters/spring-ai-starter-mcp-server @@ -564,6 +569,7 @@ ${project.basedir}/spring-ai-docs/src/main/javadoc/overview.html false + false false none diff --git a/spring-ai-bom/pom.xml b/spring-ai-bom/pom.xml index 64f1aa749..3255a4cfa 100644 --- a/spring-ai-bom/pom.xml +++ b/spring-ai-bom/pom.xml @@ -322,6 +322,12 @@ ${project.version} + + org.springframework.ai + spring-ai-deepseek + ${project.version} + + @@ -624,6 +630,12 @@ ${project.version} + + org.springframework.ai + spring-ai-autoconfigure-model-deepseek + ${project.version} + + org.springframework.ai @@ -973,6 +985,12 @@ ${project.version} + + org.springframework.ai + spring-ai-starter-model-deepseek + ${project.version} + + diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/images/deepseek_r1_multiround_example.png b/spring-ai-docs/src/main/antora/modules/ROOT/images/deepseek_r1_multiround_example.png new file mode 100644 index 0000000000000000000000000000000000000000..2ad59127c6eec0b33b546cb3e9cb58e4e314dbe8 GIT binary patch literal 51483 zcmeEug;QKj(=Q&}-Q6X@-Q9v~(6G3>YZBZS2rj`jEbf5-fyG%okR`Z#aJl>5`{jAw zf8ndTTXU+;_Rh@dp3~jaJ^ibV)zVbLLMKOugM-6TQI^+%gF|qFUHqshFp4bDbr=o~ zUfDrTPD@2jj#kUl&DOyg00&2!@!rxhIMqli<@><5Zz;KkI)qy%rMP%xW#69DB2r~Y zQ9qL25~RmtP$D7(hpUoW^0VLiVpWo(avw&HgX*vvq&TWb-#F;cv-?S0BB}pj4d-BL z5hhc9fwzv>iY&oLK~bcp6)Wm4g&RzQ2PwpbCn10^q>sE&yO0MpBfr{(&woG?L0oqF zwqwIs4!0Z>?wrrac<#;U>#FI%nvbu@asg%l<|t+$rl@o)UKBiTZsY)-L@=(kz6mB~>xT5O=?A01 z5R^|oZDgd3oVeED-Ei~G_m)dT+9^grR6njwq09~b_YA0}Hd2U)N)InDJQ4hhm_=q* zFE1~jZ(m+ck1;Wicrh^vdg0(Sdrhtd5U?v@ODha8QnA(0fMbWlLuK{u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Iq(oj9ym@=|FUqHfpUEW;e|=TO~vp(jjh>+ESh|;(8FE!AS9xEb;)Y}mE2VQx#g)Jp5cCAcFC5d zFO+hH?eJZEg^d5p!=WuY%ZQnG4^=dr5I4Dl&&_ErFC?2?Vo3CE?GWQE9djL`lr3lK zF5TbYlEN9w*c|Ss_D3kCEriOglI|u|*>eWh$&uZ>52P^(u#QM;RC8SmYoM7iXOmor zOIgMBm@gF)-8tG{k(ndP+UtQ>xY&=ajYwn?iil8HySx7Oac@!3IcQ zE17Es{G>LUhPS#7YXs=#W3~wyI5fUjixizM6FQL^S1fxdaEU=e?_-xhR*}R!l^bej#$V?5hE%$fOw}TqiDW|G@H(CEj)iJfwpbeq z7w(_UD9hECrYLTNM6bMJvhkC|eXO9uT#3H!R;!bC#Zu{hsTDF)^A2@8%YMxwRO{?w zxE^&)`QB=*raIHn|G_;;8M6uHMtOuEn7PlqEu5WDnA=c;?1{hUnxumTmcl5 zG+~Q<(`U*;`$ZmAfe%JxhqJO-2yiZ8MvS6d58bWq9}mtbOzl-Fh!++L1hu)U^R_aG z=alP|)ohMEt;XLsl&l1M5GzgND^IkiNbA~9sqY>}g(xW1_jOXG9&+lUxQlCZ&Uez|fakRe>PevAoE*@B7yg%0%Yqt}# zAs#wLEMngkUZh0!{qpA>87TNGFd}1lqCD-iNX*C7;MVu~GlBkps_mI~z_T7KNARa1 z_Vk3v`d|?tWF4FYzo&0cm%@u|kbeCS_(p(%uLgJAk#73?=UzbJ%m04)|Cz%0BlL)n z5Ifpww1+|wpt|OV%Ae1g2J4*_6H<5;Q;J-}0B-M$$6CkWN!a}9XZ!j0Avnoc?8z{2 zn(;eS%rHNHL(VJqI?q$f*qHYRg{*Ei)KJx3!?e`?d2;Yp7;m t6AaAHj(qxnAOkx7|Np`NJN` property to specify the model. Refer to https://api-docs.deepseek.com/quick_start/pricing[Supported Models] for available options. - -Example environment variables configuration: +You will need to create an API key with DeepSeek to access DeepSeek language models. +Create an account at https://platform.deepseek.com/sign_up[DeepSeek registration page] and generate a token on the https://platform.deepseek.com/api_keys[API Keys page]. +The Spring AI project defines a configuration property named `spring.ai.deepseek.api-key` that you should set to the value of the `API Key` obtained from the https://platform.deepseek.com/api_keys[API Keys page]. +Exporting an environment variable is one way to set this configuration property: [source,shell] ---- -export SPRING_AI_OPENAI_API_KEY= -export SPRING_AI_OPENAI_BASE_URL=https://api.deepseek.com -export SPRING_AI_OPENAI_CHAT_MODEL=deepseek-chat +export SPRING_AI_DEEPSEEK_API_KEY= ---- === Add Repositories and BOM -Spring AI artifacts are published in Maven Central and Spring Snapshot repositories. +Spring AI artifacts are published in the Spring Milestone and Snapshot repositories. Refer to the xref:getting-started.adoc#repositories[Repositories] section to add these repositories to your build system. -To help with dependency management, Spring AI provides a BOM (bill of materials) to ensure that a consistent version of Spring AI is used throughout the entire project. Refer to the xref:getting-started.adoc#dependency-management[Dependency Management] section to add the Spring AI BOM to your build system. +To help with dependency management, Spring AI provides a BOM (bill of materials) to ensure that a consistent version of Spring AI is used throughout your entire project. Refer to the xref:getting-started.adoc#dependency-management[Dependency Management] section to add the Spring AI BOM to your build system. + == Auto-configuration -[NOTE] -==== -There has been a significant change in the Spring AI auto-configuration, starter modules' artifact names. -Please refer to the https://docs.spring.io/spring-ai/reference/upgrade-notes.html[upgrade notes] for more information. -==== +Spring AI provides Spring Boot auto-configuration for the DeepSeek Chat Model. +To enable it, add the following dependency to your project's Maven `pom.xml` file: -Spring AI provides Spring Boot auto-configuration for the OpenAI Chat Client. -To enable it add the following dependency to your project's Maven `pom.xml` or Gradle `build.gradle` build files: - -[tabs] -====== -Maven:: -+ [source, xml] ---- org.springframework.ai - spring-ai-starter-model-openai + spring-ai-deepseek-spring-boot-starter ---- -Gradle:: -+ +or to your Gradle `build.gradle` file. + [source,groovy] ---- dependencies { - implementation 'org.springframework.ai:spring-ai-starter-model-openai' + implementation 'org.springframework.ai:spring-ai-deepseek-spring-boot-starter' } ---- -====== TIP: Refer to the xref:getting-started.adoc#dependency-management[Dependency Management] section to add the Spring AI BOM to your build file. @@ -78,9 +51,9 @@ TIP: Refer to the xref:getting-started.adoc#dependency-management[Dependency Man ==== Retry Properties -The prefix `spring.ai.retry` is used as the property prefix that lets you configure the retry mechanism for the OpenAI chat model. +The prefix `spring.ai.retry` is used as the property prefix that lets you configure the retry mechanism for the DeepSeek Chat model. -[cols="3,5,1", stripes=even] +[cols="3,5,1"] |==== | Property | Description | Default @@ -88,147 +61,273 @@ The prefix `spring.ai.retry` is used as the property prefix that lets you config | spring.ai.retry.backoff.initial-interval | Initial sleep duration for the exponential backoff policy. | 2 sec. | spring.ai.retry.backoff.multiplier | Backoff interval multiplier. | 5 | spring.ai.retry.backoff.max-interval | Maximum backoff duration. | 3 min. -| spring.ai.retry.on-client-errors | If false, throw a NonTransientAiException, and do not attempt retry for `4xx` client error codes | false +| spring.ai.retry.on-client-errors | If false, throws a NonTransientAiException, and does not attempt a retry for `4xx` client error codes | false | spring.ai.retry.exclude-on-http-codes | List of HTTP status codes that should not trigger a retry (e.g. to throw NonTransientAiException). | empty | spring.ai.retry.on-http-codes | List of HTTP status codes that should trigger a retry (e.g. to throw TransientAiException). | empty |==== ==== Connection Properties -The prefix `spring.ai.openai` is used as the property prefix that lets you connect to OpenAI. +The prefix `spring.ai.deepseek` is used as the property prefix that lets you connect to DeepSeek. -[cols="3,5,1", stripes=even] +[cols="3,5,1"] |==== | Property | Description | Default -| spring.ai.openai.base-url | The URL to connect to. Must be set to `https://api.deepseek.com` | - -| spring.ai.openai.api-key | Your DeepSeek API Key | - +| spring.ai.deepseek.base-url | The URL to connect to | https://api.deepseek.com +| spring.ai.deepseek.api-key | The API Key | - |==== - ==== Configuration Properties -[NOTE] -==== -Enabling and disabling of the chat auto-configurations are now configured via top level properties with the prefix `spring.ai.model.chat`. +The prefix `spring.ai.deepseek.chat` is the property prefix that lets you configure the chat model implementation for DeepSeek. -To enable, spring.ai.model.chat=openai (It is enabled by default) - -To disable, spring.ai.model.chat=none (or any value which doesn't match openai) - -This change is done to allow configuration of multiple models. -==== - - -The prefix `spring.ai.openai.chat` is the property prefix that lets you configure the chat model implementation for OpenAI. -[cols="3,5,1", stripes=even] +[cols="3,5,1"] |==== | Property | Description | Default -| spring.ai.openai.chat.enabled (Removed and no longer valid) | Enable OpenAI chat model. | true -| spring.ai.model.chat | Enable OpenAI chat model. | openai -| spring.ai.openai.chat.base-url | Optional overrides the spring.ai.openai.base-url to provide chat specific url. Must be set to `https://api.deepseek.com` | - -| spring.ai.openai.chat.api-key | Optional overrides the spring.ai.openai.api-key to provide chat specific api-key | - -| spring.ai.openai.chat.options.model | The link:https://api-docs.deepseek.com/quick_start/pricing[DeepSeek LLM model] to use | - -| spring.ai.openai.chat.options.temperature | The sampling temperature to use that controls the apparent creativity of generated completions. Higher values will make output more random while lower values will make results more focused and deterministic. It is not recommended to modify temperature and top_p for the same completions request as the interaction of these two settings is difficult to predict. | 0.8 -| spring.ai.openai.chat.options.frequencyPenalty | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. | 0.0f -| spring.ai.openai.chat.options.maxTokens | The maximum number of tokens to generate in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length. | - -| spring.ai.openai.chat.options.n | How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. | 1 -| spring.ai.openai.chat.options.presencePenalty | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. | - -| spring.ai.openai.chat.options.responseFormat | An object specifying the format that the model must output. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON.| - -| spring.ai.openai.chat.options.seed | This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. | - -| spring.ai.openai.chat.options.stop | Up to 4 sequences where the API will stop generating further tokens. | - -| spring.ai.openai.chat.options.topP | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. | - -| spring.ai.openai.chat.options.tools | A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. | - -| spring.ai.openai.chat.options.toolChoice | Controls which (if any) function is called by the model. none means the model will not call a function and instead generates a message. auto means the model can pick between generating a message or calling a function. Specifying a particular function via {"type: "function", "function": {"name": "my_function"}} forces the model to call that function. none is the default when no functions are present. auto is the default if functions are present. | - -| spring.ai.openai.chat.options.user | A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. | - -| spring.ai.openai.chat.options.functions | List of functions, identified by their names, to enable for function calling in a single prompt requests. Functions with those names must exist in the functionCallbacks registry. | - -| spring.ai.openai.chat.options.stream-usage | (For streaming only) Set to add an additional chunk with token usage statistics for the entire request. The `choices` field for this chunk is an empty array and all other chunks will also include a usage field, but with a null value. | false -| spring.ai.openai.chat.options.proxy-tool-calls | If true, the Spring AI will not handle the function calls internally, but will proxy them to the client. Then is the client's responsibility to handle the function calls, dispatch them to the appropriate function, and return the results. If false (the default), the Spring AI will handle the function calls internally. Applicable only for chat models with function calling support | false +| spring.ai.deepseek.chat.enabled | Enables the DeepSeek chat model. | true +| spring.ai.deepseek.chat.base-url | Optionally overrides the spring.ai.deepseek.base-url to provide a chat-specific URL | https://api.deepseek.com/ +| spring.ai.deepseek.chat.api-key | Optionally overrides the spring.ai.deepseek.api-key to provide a chat-specific API key | - +| spring.ai.deepseek.chat.completions-path | The path to the chat completions endpoint | /chat/completions +| spring.ai.deepseek.chat.beta-prefix-path | The prefix path to the beta feature endpoint | /beta/chat/completions +| spring.ai.deepseek.chat.options.model | ID of the model to use. You can use either deepseek-coder or deepseek-chat. | deepseek-chat +| spring.ai.deepseek.chat.options.frequencyPenalty | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. | 0.0f +| spring.ai.deepseek.chat.options.maxTokens | The maximum number of tokens to generate in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length. | - +| spring.ai.deepseek.chat.options.presencePenalty | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. | 0.0f +| spring.ai.deepseek.chat.options.stop | Up to 4 sequences where the API will stop generating further tokens. | - +| spring.ai.deepseek.chat.options.temperature | Which sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p, but not both. | 1.0F +| spring.ai.deepseek.chat.options.topP | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature, but not both. | 1.0F +| spring.ai.deepseek.chat.options.logprobs | Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of the message. | - +| spring.ai.deepseek.chat.options.topLogprobs | An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used. | - |==== -TIP: All properties prefixed with `spring.ai.openai.chat.options` can be overridden at runtime by adding a request specific <> to the `Prompt` call. +NOTE: You can override the common `spring.ai.deepseek.base-url` and `spring.ai.deepseek.api-key` for the `ChatModel` implementations. +The `spring.ai.deepseek.chat.base-url` and `spring.ai.deepseek.chat.api-key` properties, if set, take precedence over the common properties. +This is useful if you want to use different DeepSeek accounts for different models and different model endpoints. + +TIP: All properties prefixed with `spring.ai.deepseek.chat.options` can be overridden at runtime by adding a request-specific <> to the `Prompt` call. == Runtime Options [[chat-options]] -The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiChatOptions.java[OpenAiChatOptions.java] provides model configurations, such as the model to use, the temperature, the frequency penalty, etc. +The link:https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-deepseek/src/main/java/org/springframework/ai/deepseek/DeepSeekChatOptions.java[DeepSeekChatOptions.java] provides model configurations, such as the model to use, the temperature, the frequency penalty, etc. -On start-up, the default options can be configured with the `OpenAiChatModel(api, options)` constructor or the `spring.ai.openai.chat.options.*` properties. +On startup, the default options can be configured with the `DeepSeekChatModel(api, options)` constructor or the `spring.ai.deepseek.chat.options.*` properties. -At run-time you can override the default options by adding new, request specific, options to the `Prompt` call. -For example to override the default model and temperature for a specific request: +At runtime, you can override the default options by adding new, request-specific options to the `Prompt` call. +For example, to override the default model and temperature for a specific request: [source,java] ---- ChatResponse response = chatModel.call( new Prompt( - "Generate the names of 5 famous pirates.", - OpenAiChatOptions.builder() - .model("deepseek-chat") - .temperature(0.4) + "Generate the names of 5 famous pirates. Please provide the JSON response without any code block markers such as ```json```.", + DeepSeekChatOptions.builder() + .withModel(DeepSeekApi.ChatModel.DEEPSEEK_CHAT.getValue()) + .withTemperature(0.8f) .build() )); ---- -TIP: In addition to the model specific https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiChatOptions.java[OpenAiChatOptions] you can use a portable https://github.com/spring-projects/spring-ai/blob/main/spring-ai-client-chat/src/main/java/org/springframework/ai/chat/prompt/ChatOptions.java[ChatOptions] instance, created with the https://github.com/spring-projects/spring-ai/blob/main/spring-ai-client-chat/src/main/java/org/springframework/ai/chat/prompt/ChatOptions.java[ChatOptions#builder()]. +TIP: In addition to the model-specific link:https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-deepseek/src/main/java/org/springframework/ai/deepseek/DeepSeekChatOptions.java[DeepSeekChatOptions], you can use a portable https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptions.java[ChatOptions] instance, created with the https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptionsBuilder.java[ChatOptionsBuilder#builder()]. -== Function Calling +== Sample Controller (Auto-configuration) -NOTE: The current version of the deepseek-chat model's Function Calling capability is unstable, which may result in looped calls or empty responses. +https://start.spring.io/[Create] a new Spring Boot project and add the `spring-ai-deepseek-spring-boot-starter` to your pom (or gradle) dependencies. -== Multimodal - -NOTE: Currently, the DeepSeek API doesn't support media content. - -== Sample Controller - -https://start.spring.io/[Create] a new Spring Boot project and add the `spring-ai-starter-model-openai` to your pom (or gradle) dependencies. - -Add a `application.properties` file, under the `src/main/resources` directory, to enable and configure the OpenAi chat model: +Add an `application.properties` file under the `src/main/resources` directory to enable and configure the DeepSeek Chat model: [source,application.properties] ---- -spring.ai.openai.api-key= -spring.ai.openai.base-url=https://api.deepseek.com -spring.ai.openai.chat.options.model=deepseek-chat -spring.ai.openai.chat.options.temperature=0.7 - -# The DeepSeek API doesn't support embeddings, so we need to disable it. -spring.ai.openai.embedding.enabled=false +spring.ai.deepseek.api-key=YOUR_API_KEY +spring.ai.deepseek.chat.options.model=deepseek-chat +spring.ai.deepseek.chat.options.temperature=0.8 ---- -TIP: replace the `api-key` with your DeepSeek Api key. +TIP: Replace the `api-key` with your DeepSeek credentials. -This will create a `OpenAiChatModel` implementation that you can inject into your class. -Here is an example of a simple `@Controller` class that uses the chat model for text generations. +This will create a `DeepSeekChatModel` implementation that you can inject into your class. +Here is an example of a simple `@Controller` class that uses the chat model for text generation. [source,java] ---- @RestController public class ChatController { - private final OpenAiChatModel chatModel; + private final DeepSeekChatModel chatModel; @Autowired - public ChatController(OpenAiChatModel chatModel) { + public ChatController(DeepSeekChatModel chatModel) { this.chatModel = chatModel; } @GetMapping("/ai/generate") public Map generate(@RequestParam(value = "message", defaultValue = "Tell me a joke") String message) { - return Map.of("generation", this.chatModel.call(message)); + return Map.of("generation", chatModel.call(message)); } @GetMapping("/ai/generateStream") - public Flux generateStream(@RequestParam(value = "message", defaultValue = "Tell me a joke") String message) { - Prompt prompt = new Prompt(new UserMessage(message)); - return this.chatModel.stream(prompt); + public Flux generateStream(@RequestParam(value = "message", defaultValue = "Tell me a joke") String message) { + var prompt = new Prompt(new UserMessage(message)); + return chatModel.stream(prompt); } } ---- -== References +== Chat Prefix Completion +The chat prefix completion follows the Chat Completion API, where users provide an assistant's prefix message for the model to complete the rest of the message. -* https://api-docs.deepseek.com/[Documentation Home] -* https://api-docs.deepseek.com/quick_start/error_codes[Error Codes] -* https://api-docs.deepseek.com/quick_start/rate_limit[Rate Limits] +When using prefix completion, the user must ensure that the last message in the messages list is a DeepSeekAssistantMessage. + +Below is a complete Java code example for chat prefix completion. In this example, we set the prefix message of the assistant to "```python\n" to force the model to output Python code, and set the stop parameter to ['```'] to prevent additional explanations from the model. + +[source,java] +---- +@RestController +public class CodeGenerateController { + + private final DeepSeekChatModel chatModel; + + @Autowired + public ChatController(DeepSeekChatModel chatModel) { + this.chatModel = chatModel; + } + + @GetMapping("/ai/generatePythonCode") + public String generate(@RequestParam(value = "message", defaultValue = "Please write quick sort code") String message) { + UserMessage userMessage = new UserMessage(message); + Message assistantMessage = DeepSeekAssistantMessage.prefixAssistantMessage("```python\\n"); + Prompt prompt = new Prompt(List.of(userMessage, assistantMessage), ChatOptions.builder().stopSequences(List.of("```")).build()); + ChatResponse response = chatModel.call(prompt); + return response.getResult().getOutput().getText(); + } +} +---- + +== Reasoning Model (deepseek-reasoner) +The `deepseek-reasoner` is a reasoning model developed by DeepSeek. Before delivering the final answer, the model first generates a Chain of Thought (CoT) to enhance the accuracy of its responses. Our API provides users with access to the CoT content generated by `deepseek-reasoner`, enabling them to view, display, and distill it. + +You can use the `DeepSeekAssistantMessage` to get the CoT content generated by `deepseek-reasoner`. +[source,java] +---- +public void deepSeekReasonerExample() { + DeepSeekChatOptions promptOptions = DeepSeekChatOptions.builder() + .model(DeepSeekApi.ChatModel.DEEPSEEK_REASONER.getValue()) + .build(); + Prompt prompt = new Prompt("9.11 and 9.8, which is greater?", promptOptions); + ChatResponse response = chatModel.call(prompt); + + // Get the CoT content generated by deepseek-reasoner, only available when using deepseek-reasoner model + DeepSeekAssistantMessage deepSeekAssistantMessage = (DeepSeekAssistantMessage) response.getResult().getOutput(); + String reasoningContent = deepSeekAssistantMessage.getReasoningContent(); + String text = deepSeekAssistantMessage.getText(); +} +---- +== Reasoning Model Multi-round Conversation +In each round of the conversation, the model outputs the CoT (reasoning_content) and the final answer (content). In the next round of the conversation, the CoT from previous rounds is not concatenated into the context, as illustrated in the following diagram: + +image::deepseek_r1_multiround_example.png[Multimodal Test Image, align="center"] + +Please note that if the reasoning_content field is included in the sequence of input messages, the API will return a 400 error. Therefore, you should remove the reasoning_content field from the API response before making the API request, as demonstrated in the API example. +[source,java] +---- +public String deepSeekReasonerMultiRoundExample() { + List messages = new ArrayList<>(); + messages.add(new UserMessage("9.11 and 9.8, which is greater?")); + DeepSeekChatOptions promptOptions = DeepSeekChatOptions.builder() + .model(DeepSeekApi.ChatModel.DEEPSEEK_REASONER.getValue()) + .build(); + + Prompt prompt = new Prompt(messages, promptOptions); + ChatResponse response = chatModel.call(prompt); + + DeepSeekAssistantMessage deepSeekAssistantMessage = (DeepSeekAssistantMessage) response.getResult().getOutput(); + String reasoningContent = deepSeekAssistantMessage.getReasoningContent(); + String text = deepSeekAssistantMessage.getText(); + + messages.add(new AssistantMessage(Objects.requireNonNull(text))); + messages.add(new UserMessage("How many Rs are there in the word 'strawberry'?")); + Prompt prompt2 = new Prompt(messages, promptOptions); + ChatResponse response2 = chatModel.call(prompt2); + + DeepSeekAssistantMessage deepSeekAssistantMessage2 = (DeepSeekAssistantMessage) response2.getResult().getOutput(); + String reasoningContent2 = deepSeekAssistantMessage2.getReasoningContent(); + return deepSeekAssistantMessage2.getText(); +} +---- + +== Manual Configuration + +The link:https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-deepseek/src/main/java/org/springframework/ai/deepseek/DeepSeekChatModel.java[DeepSeekChatModel] implements the `ChatModel` and `StreamingChatModel` and uses the <> to connect to the DeepSeek service. + +Add the `spring-ai-deepseek` dependency to your project's Maven `pom.xml` file: + +[source, xml] +---- + + org.springframework.ai + spring-ai-deepseek + +---- + +or to your Gradle `build.gradle` file. + +[source,groovy] +---- +dependencies { + implementation 'org.springframework.ai:spring-ai-deepseek' +} +---- + +TIP: Refer to the xref:getting-started.adoc#dependency-management[Dependency Management] section to add the Spring AI BOM to your build file. + +Next, create a `DeepSeekChatModel` and use it for text generation: + +[source,java] +---- +var deepSeekApi = new DeepSeekApi(System.getenv("DEEPSEEK_API_KEY")); + +var chatModel = new DeepSeekChatModel(deepSeekApi, DeepSeekChatOptions.builder() + .withModel(DeepSeekApi.ChatModel.DEEPSEEK_CHAT.getValue()) + .withTemperature(0.4f) + .withMaxTokens(200) + .build()); + +ChatResponse response = chatModel.call( + new Prompt("Generate the names of 5 famous pirates.")); + +// Or with streaming responses +Flux streamResponse = chatModel.stream( + new Prompt("Generate the names of 5 famous pirates.")); +---- + +The `DeepSeekChatOptions` provides the configuration information for the chat requests. +The `DeepSeekChatOptions.Builder` is a fluent options builder. + +=== Low-level DeepSeekApi Client [[low-level-api]] + +The link:https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-deepseek/src/main/java/org/springframework/ai/deepseek/api/DeepSeekApi.java[DeepSeekApi] is a lightweight Java client for link:https://platform.deepseek.com/api-docs/[DeepSeek API]. + +Here is a simple snippet showing how to use the API programmatically: + +[source,java] +---- +DeepSeekApi deepSeekApi = + new DeepSeekApi(System.getenv("DEEPSEEK_API_KEY")); + +ChatCompletionMessage chatCompletionMessage = + new ChatCompletionMessage("Hello world", Role.USER); + +// Sync request +ResponseEntity response = deepSeekApi.chatCompletionEntity( + new ChatCompletionRequest(List.of(chatCompletionMessage), DeepSeekApi.ChatModel.DEEPSEEK_CHAT.getValue(), 0.7f, false)); + +// Streaming request +Flux streamResponse = deepSeekApi.chatCompletionStream( + new ChatCompletionRequest(List.of(chatCompletionMessage), DeepSeekApi.ChatModel.DEEPSEEK_CHAT.getValue(), 0.7f, true)); +---- + +Follow the https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-deepseek/src/main/java/org/springframework/ai/deepseek/api/DeepSeekApi.java[DeepSeekApi.java]'s JavaDoc for further information. + +==== DeepSeekApi Samples +* The link:https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-deepseek/src/test/java/org/springframework/ai/deepseek/api/DeepSeekApiIT.java[DeepSeekApiIT.java] test provides some general examples of how to use the lightweight library. diff --git a/spring-ai-model/src/main/java/org/springframework/ai/model/SpringAIModels.java b/spring-ai-model/src/main/java/org/springframework/ai/model/SpringAIModels.java index 07ef6e4fa..0e53a9195 100644 --- a/spring-ai-model/src/main/java/org/springframework/ai/model/SpringAIModels.java +++ b/spring-ai-model/src/main/java/org/springframework/ai/model/SpringAIModels.java @@ -54,4 +54,6 @@ public final class SpringAIModels { public static final String ZHIPUAI = "zhipuai"; + public static final String DEEPSEEK = "deepseek"; + } diff --git a/spring-ai-spring-boot-starters/spring-ai-starter-model-deepseek/pom.xml b/spring-ai-spring-boot-starters/spring-ai-starter-model-deepseek/pom.xml new file mode 100644 index 000000000..df02c772e --- /dev/null +++ b/spring-ai-spring-boot-starters/spring-ai-starter-model-deepseek/pom.xml @@ -0,0 +1,70 @@ + + + + + 4.0.0 + + org.springframework.ai + spring-ai-parent + 1.0.0-SNAPSHOT + ../../pom.xml + + spring-ai-starter-model-deepseek + jar + Spring AI Starter - DeepSeek + Spring AI DeepSeek Spring Boot Starter + https://github.com/spring-projects/spring-ai + + + https://github.com/spring-projects/spring-ai + git://github.com/spring-projects/spring-ai.git + git@github.com:spring-projects/spring-ai.git + + + + + + org.springframework.boot + spring-boot-starter + + + + org.springframework.ai + spring-ai-autoconfigure-model-deepseek + ${project.parent.version} + + + + org.springframework.ai + spring-ai-deepseek + ${project.parent.version} + + + + org.springframework.ai + spring-ai-autoconfigure-model-chat-client + ${project.parent.version} + + + + org.springframework.ai + spring-ai-autoconfigure-model-chat-memory + ${project.parent.version} + + + +