From b3cfa2b900ea785e055e4ff71086eeb52f6578a3 Mon Sep 17 00:00:00 2001 From: Thomas Vitale Date: Tue, 14 May 2024 07:38:58 +0200 Subject: [PATCH] OpenAI: Add gpt-4o to chat model enum Signed-off-by: Thomas Vitale --- .../org/springframework/ai/openai/api/OpenAiApi.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java index 605697906..cc4256267 100644 --- a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java +++ b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java @@ -109,10 +109,17 @@ public class OpenAiApi { /** * OpenAI Chat Completion Models: - * GPT-4 and GPT-4 Turbo and - * GPT-3.5 Turbo. + * - GPT-4o + * - GPT-4 and GPT-4 Turbo + * - GPT-3.5 Turbo. */ public enum ChatModel { + /** + * Multimodal flagship model that’s cheaper and faster than GPT-4 Turbo. + * Currently points to gpt-4o-2024-05-13. + */ + GPT_4_O("gpt-4o"), + /** * (New) GPT-4 Turbo - latest GPT-4 model intended to reduce cases * of “laziness” where the model doesn’t complete a task.