Skip to content

Commit 05eec8a

Browse files
docs(readme): improve custom base_url example (#1694)
OPENAI_BASE_URL defaults to https://api.openai.com/v1, so if you add a replacement and forget to append the /v1, it will result in 404s
1 parent 93aa548 commit 05eec8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ from openai import OpenAI, DefaultHttpxClient
567567

568568
client = OpenAI(
569569
# Or use the `OPENAI_BASE_URL` env var
570-
base_url="http://my.test.server.example.com:8083",
570+
base_url="http://my.test.server.example.com:8083/v1",
571571
http_client=DefaultHttpxClient(
572572
proxies="http://my.test.proxy.example.com",
573573
transport=httpx.HTTPTransport(local_address="0.0.0.0"),

0 commit comments

Comments
 (0)