Skip to content

Commit d281da4

Browse files
HarrisonC118ilayaperumalg
authored andcommitted
docs: Remove redundant /v1 suffix from OpenAI base-url examples
Removed the '/v1' suffix from the `spring.ai.openai.base-url` examples in the OpenAI Chat documentation. The `OpenAiApi` already includes `/v1` in the default `completionsPath` (`/v1/chat/completions`). Including it in the base-url causes a double `/v1/v1` path in the final request URL. This change aligns the documentation with the actual client behavior. Signed-off-by: Harrison <[email protected]>
1 parent 5ad8485 commit d281da4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/openai-chat.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ Each property under `spring.ai.openai.chat.options.extra-body` becomes a top-lev
784784

785785
[source,properties]
786786
----
787-
spring.ai.openai.base-url=http://localhost:8000/v1
787+
spring.ai.openai.base-url=http://localhost:8000
788788
spring.ai.openai.chat.options.model=meta-llama/Llama-3-8B-Instruct
789789
spring.ai.openai.chat.options.temperature=0.7
790790
spring.ai.openai.chat.options.extra-body.top_k=50
@@ -831,7 +831,7 @@ When running vLLM with a Llama model, you might want to use sampling parameters
831831

832832
[source,properties]
833833
----
834-
spring.ai.openai.base-url=http://localhost:8000/v1
834+
spring.ai.openai.base-url=http://localhost:8000
835835
spring.ai.openai.chat.options.model=meta-llama/Llama-3-70B-Instruct
836836
spring.ai.openai.chat.options.extra-body.top_k=40
837837
spring.ai.openai.chat.options.extra-body.top_p=0.95
@@ -998,7 +998,7 @@ vllm serve deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B \
998998

999999
[source,properties]
10001000
----
1001-
spring.ai.openai.base-url=http://localhost:8000/v1
1001+
spring.ai.openai.base-url=http://localhost:8000
10021002
spring.ai.openai.chat.options.model=deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B
10031003
----
10041004

0 commit comments

Comments
 (0)