Class OpenAI.Builder
java.lang.Object
io.github.stefanbratanov.jvm.openai.OpenAI.Builder
- Enclosing class:
- OpenAI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()httpClient(HttpClient httpClient) organization(String organization) requestTimeout(Duration requestTimeout)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiKey
- Parameters:
apiKey- the API key used for authentication
-
adminKey
- Parameters:
adminKey- the API key used for administration endpoints.
-
baseUrl
- Parameters:
baseUrl- the url which exposes the OpenAI API
-
organization
- Parameters:
organization- for users who belong to multiple organizations and are accessing their projects through their legacy user API key, specify which organization will be used for the API requests
-
project
- Parameters:
project- for users who are accessing their projects through their legacy user API key, specify which project will be used for the API requests
-
httpClient
- Parameters:
httpClient- a customHttpClientwhich will be used for the API requests
-
requestTimeout
- Parameters:
requestTimeout- a timeout in the form of aDurationwhich will be set for the API requests. If none is set, there will be no timeout.
-
build
-