Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 6398584

Browse files
Add example for base url
1 parent 87c4e84 commit 6398584

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ OpenAI openAI = OpenAI.newBuilder(System.getenv("OPENAI_API_KEY"))
7979
.project(System.getenv("PROJECT_ID"))
8080
.build();
8181
```
82+
- Configure a custom base url
83+
```java
84+
OpenAI openAI = OpenAI.newBuilder(System.getenv("OPENAI_API_KEY"))
85+
.baseUrl("https://api.foobar.com/v1/")
86+
.build();
87+
```
8288
- Configure a custom Java's `HttpClient`
8389
```java
8490
HttpClient httpClient = HttpClient.newBuilder()

0 commit comments

Comments
 (0)