From dcc91487b42a96ccb93edf1f6cbc35ff8615b09f Mon Sep 17 00:00:00 2001 From: Justin Martz <6052996+JustinMartz@users.noreply.github.com> Date: Sun, 2 Mar 2025 17:11:26 -0700 Subject: [PATCH] Update openai-chat.adoc Existing example displays a typo in the code example for Runtime Options: ChatResponse response = chatModel.call( new Prompt( "Generate the names of 5 famous pirates.", OpenAiChatOptions.builder() .model("gpt-4-o") .temperature(0.4) .build() )); Using gpt-4-0 generates this error: org.springframework.ai.retry.NonTransientAiException: 404 - { "error": { "message": "The model `gpt-4-o` does not exist or you do not have access to it.", "type": "invalid_request_error", "param": null, "code": "model_not_found" } } Changing the model String in the example to "gpt-4o" resolves this. --- .../main/antora/modules/ROOT/pages/api/chat/openai-chat.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d7bc4b6eb..eeadf462e 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 @@ -154,7 +154,7 @@ ChatResponse response = chatModel.call( new Prompt( "Generate the names of 5 famous pirates.", OpenAiChatOptions.builder() - .model("gpt-4-o") + .model("gpt-4o") .temperature(0.4) .build() ));