Class Header

java.lang.Object
com.jackdaw.chatwithnpc.openaiapi.Header

public class Header extends Object
A class to build headers for the OpenAI API
  • Method Details

    • builder

      @Contract(value=" -> new", pure=true) @NotNull public static @NotNull Header builder()
      Create a new instance of the header builder
      Returns:
      A new instance of the header builder
    • buildDefault

      public static Map<String,String> buildDefault()
      Build the default headers for the OpenAI API
      Returns:
      The default headers for the OpenAI API
    • buildBeta

      public static Map<String,String> buildBeta()
      Build the beta headers for the OpenAI API
      Returns:
      The beta headers for the OpenAI API
    • add

      public Header add(@NotNull @NotNull Header.Type type)
      Add a header to the builder
      Parameters:
      type - The type of header to add
      Returns:
      The header builder
    • build

      public Map<String,String> build()
      Build the headers
      Returns:
      The headers