From 7bc79f51d12c6a20e60a8b1d2e4cb32233918626 Mon Sep 17 00:00:00 2001 From: Christian Tzolov Date: Fri, 14 Feb 2025 14:46:11 +0100 Subject: [PATCH] chore(openai): update default chat model to gpt-4o-mini Signed-off-by: Christian Tzolov --- .../main/antora/modules/ROOT/pages/api/chat/openai-chat.adoc | 2 +- .../ai/autoconfigure/openai/OpenAiChatProperties.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/openai-chat.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/openai-chat.adoc index f1f3431fc..d7bc4b6eb 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/openai-chat.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/openai-chat.adoc @@ -100,7 +100,7 @@ The prefix `spring.ai.openai.chat` is the property prefix that lets you configur | spring.ai.openai.chat.api-key | Optional override for the `spring.ai.openai.api-key` to provide a chat-specific API Key. | - | spring.ai.openai.chat.organization-id | Optionally, you can specify which organization to use for an API request. | - | spring.ai.openai.chat.project-id | Optionally, you can specify which project to use for an API request. | - -| spring.ai.openai.chat.options.model | Name of the OpenAI chat model to use. You can select between models such as: `gpt-4o`, `gpt-4o-mini`, `gpt-4-turbo`, `gpt-3.5-turbo`, and more. See the https://platform.openai.com/docs/models[models] page for more information. | `gpt-4o` +| spring.ai.openai.chat.options.model | Name of the OpenAI chat model to use. You can select between models such as: `gpt-4o`, `gpt-4o-mini`, `gpt-4-turbo`, `gpt-3.5-turbo`, and more. See the https://platform.openai.com/docs/models[models] page for more information. | `gpt-4o-mini` | 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.logitBias | Modify the likelihood of specified tokens appearing in the completion. | - diff --git a/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/openai/OpenAiChatProperties.java b/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/openai/OpenAiChatProperties.java index cd9834083..cf0ee1971 100644 --- a/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/openai/OpenAiChatProperties.java +++ b/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/openai/OpenAiChatProperties.java @@ -25,7 +25,7 @@ public class OpenAiChatProperties extends OpenAiParentProperties { public static final String CONFIG_PREFIX = "spring.ai.openai.chat"; - public static final String DEFAULT_CHAT_MODEL = "gpt-4o"; + public static final String DEFAULT_CHAT_MODEL = "gpt-4o-mini"; public static final String DEFAULT_COMPLETIONS_PATH = "/v1/chat/completions";