Class Header
java.lang.Object
com.jackdaw.chatwithnpc.openaiapi.Header
A class to build headers for the OpenAI API
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionadd
(@NotNull Header.Type type) Add a header to the builderbuild()
Build the headersBuild the beta headers for the OpenAI APIBuild the default headers for the OpenAI APIstatic @NotNull Header
builder()
Create a new instance of the header builder
-
Method Details
-
builder
Create a new instance of the header builder- Returns:
- A new instance of the header builder
-
buildDefault
Build the default headers for the OpenAI API- Returns:
- The default headers for the OpenAI API
-
buildBeta
Build the beta headers for the OpenAI API- Returns:
- The beta headers for the OpenAI API
-
add
Add a header to the builder- Parameters:
type
- The type of header to add- Returns:
- The header builder
-
build
Build the headers- Returns:
- The headers
-