Interface WatsonRestApi
@Path("/ml/v1-beta")
@RegisterProvider(BearerRequestFilter.class)
@Consumes("application/json")
@Produces("application/json")
public interface WatsonRestApi
This Microprofile REST client is used as the building block of all the API
calls to Watsonx. The implementation is provided by the Reactive REST Client
in Quarkus.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classIntroduce a custom logger as the stock one logs at the DEBUG level by default... -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionchat(TextGenerationRequest request, String version) static com.fasterxml.jackson.databind.ObjectMapperobjectMapper(com.fasterxml.jackson.databind.ObjectMapper defaultObjectMapper) static WatsonExceptiontoException(jakarta.ws.rs.core.Response response)
-
Field Details
-
logger
static final org.jboss.logging.Logger logger
-
-
Method Details
-
chat
@POST @Path("generation/text") TextGenerationResponse chat(TextGenerationRequest request, @QueryParam("version") String version) throws WatsonException - Throws:
WatsonException
-
toException
-
objectMapper
static com.fasterxml.jackson.databind.ObjectMapper objectMapper(com.fasterxml.jackson.databind.ObjectMapper defaultObjectMapper)
-