Skip to content

Commit

Permalink
Add example for base url
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed May 6, 2024
1 parent 87c4e84 commit 6398584
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ OpenAI openAI = OpenAI.newBuilder(System.getenv("OPENAI_API_KEY"))
.project(System.getenv("PROJECT_ID"))
.build();
```
- Configure a custom base url
```java
OpenAI openAI = OpenAI.newBuilder(System.getenv("OPENAI_API_KEY"))
.baseUrl("https://api.foobar.com/v1/")
.build();
```
- Configure a custom Java's `HttpClient`
```java
HttpClient httpClient = HttpClient.newBuilder()
Expand Down

0 comments on commit 6398584

Please sign in to comment.