Skip to content

Commit b3cfa2b

Browse files
ThomasVitaletzolov
authored andcommitted
OpenAI: Add gpt-4o to chat model enum
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
1 parent d7dad6e commit b3cfa2b

File tree

1 file changed

+9
-2
lines changed
  • models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api

1 file changed

+9
-2
lines changed

models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,17 @@ public OpenAiApi(String baseUrl, String openAiToken, RestClient.Builder restClie
109109

110110
/**
111111
* OpenAI Chat Completion Models:
112-
* <a href="https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo">GPT-4 and GPT-4 Turbo</a> and
113-
* <a href="https://platform.openai.com/docs/models/gpt-3-5-turbo">GPT-3.5 Turbo</a>.
112+
* - <a href="https://platform.openai.com/docs/models/gpt-4o">GPT-4o</a>
113+
* - <a href="https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo">GPT-4 and GPT-4 Turbo</a>
114+
* - <a href="https://platform.openai.com/docs/models/gpt-3-5-turbo">GPT-3.5 Turbo</a>.
114115
*/
115116
public enum ChatModel {
117+
/**
118+
* Multimodal flagship model that’s cheaper and faster than GPT-4 Turbo.
119+
* Currently points to gpt-4o-2024-05-13.
120+
*/
121+
GPT_4_O("gpt-4o"),
122+
116123
/**
117124
* (New) GPT-4 Turbo - latest GPT-4 model intended to reduce cases
118125
* of “laziness” where the model doesn’t complete a task.

0 commit comments

Comments
 (0)