Package bg.codexio.ai.openai.api.sdk
Class HttpBuilder<T>
java.lang.Object
bg.codexio.ai.openai.api.sdk.HttpBuilder<T>
- Type Parameters:
T- The next stage to go afterunderstanding(ObjectMapper)orand().
Default usage is to configure the HTTP connection and
serialization / deserialization methods using
serialization / deserialization methods using
ObjectMapper. -
Constructor Summary
ConstructorsConstructorDescriptionHttpBuilder(HttpExecutorContext context, BiFunction<HttpExecutorContext, com.fasterxml.jackson.databind.ObjectMapper, T> nextStepDelegate) -
Method Summary
Modifier and TypeMethodDescriptionand()Goes to next stage with emptyObjectMapperunderstanding(com.fasterxml.jackson.databind.ObjectMapper mapper) SetsObjectMapperto be used from the HTTP client.withCallTimeout(long timeout, TimeUnit timeUnit) Configures HTTP Call TimeoutwithConnectTimeout(long timeout, TimeUnit timeUnit) Configures HTTP Connect TimeoutwithReadTimeout(long timeout, TimeUnit timeUnit) Configures HTTP Read Timeout
-
Constructor Details
-
HttpBuilder
public HttpBuilder(HttpExecutorContext context, BiFunction<HttpExecutorContext, com.fasterxml.jackson.databind.ObjectMapper, T> nextStepDelegate) - Parameters:
context-HttpExecutorContextnextStepDelegate- a supplier ofHttpBuildernext stage, which will receiveHttpExecutorContextandObjectMapperin order to create the instance.
-
-
Method Details
-
understanding
SetsObjectMapperto be used from the HTTP client.- Parameters:
mapper-ObjectMapper- Returns:
- Next stage
HttpBuilder
-
withReadTimeout
Configures HTTP Read Timeout -
withConnectTimeout
Configures HTTP Connect Timeout -
withCallTimeout
Configures HTTP Call Timeout -
and
Goes to next stage with emptyObjectMapper- Returns:
- Next stage
HttpBuilder
-