Class HttpBuilder<T>

java.lang.Object
bg.codexio.ai.openai.api.sdk.HttpBuilder<T>
Type Parameters:
T - The next stage to go after understanding(ObjectMapper) or and().

public class HttpBuilder<T> extends Object
Default usage is to configure the HTTP connection and
serialization / deserialization methods using ObjectMapper.
  • Constructor Details

  • Method Details

    • understanding

      public T understanding(com.fasterxml.jackson.databind.ObjectMapper mapper)
      Sets ObjectMapper to be used from the HTTP client.
      Parameters:
      mapper - ObjectMapper
      Returns:
      Next stage HttpBuilder
    • withReadTimeout

      public HttpBuilder<T> withReadTimeout(long timeout, TimeUnit timeUnit)
      Configures HTTP Read Timeout
    • withConnectTimeout

      public HttpBuilder<T> withConnectTimeout(long timeout, TimeUnit timeUnit)
      Configures HTTP Connect Timeout
    • withCallTimeout

      public HttpBuilder<T> withCallTimeout(long timeout, TimeUnit timeUnit)
      Configures HTTP Call Timeout
    • and

      public T and()
      Goes to next stage with empty ObjectMapper
      Returns:
      Next stage HttpBuilder