Skip to content

Commit

Permalink
docs(readme): improve custom base_url example (#1694)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
codefromthecrypt authored Sep 9, 2024
1 parent 93aa548 commit 05eec8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ from openai import OpenAI, DefaultHttpxClient

client = OpenAI(
# Or use the `OPENAI_BASE_URL` env var
base_url="http://my.test.server.example.com:8083",
base_url="http://my.test.server.example.com:8083/v1",
http_client=DefaultHttpxClient(
proxies="http://my.test.proxy.example.com",
transport=httpx.HTTPTransport(local_address="0.0.0.0"),
Expand Down

0 comments on commit 05eec8a

Please sign in to comment.