use of com.ibm.watson.developer_cloud.natural_language_understanding.v1.model.ListModelsResults in project java-sdk by watson-developer-cloud.
the class NaturalLanguageUnderstandingTest method testListModels.
/**
* Test get models.
*
* @throws InterruptedException the interrupted exception
*/
@Test
public void testListModels() throws InterruptedException {
server.enqueue(jsonResponse(models));
final ListModelsResults response = service.listModels().execute();
final RecordedRequest request = server.takeRequest();
assertEquals(MODELS_PATH, request.getPath());
assertEquals("GET", request.getMethod());
assertEquals(models, response);
}
use of com.ibm.watson.developer_cloud.natural_language_understanding.v1.model.ListModelsResults in project java-sdk by watson-developer-cloud.
the class NaturalLanguageUnderstanding method listModels.
/**
* List models.
*
* Lists available models for Relations and Entities features, including Watson Knowledge Studio custom models that
* you have created and linked to your Natural Language Understanding service.
*
* @param listModelsOptions the {@link ListModelsOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link ListModelsResults}
*/
public ServiceCall<ListModelsResults> listModels(ListModelsOptions listModelsOptions) {
String[] pathSegments = { "v1/models" };
RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments));
builder.query(VERSION, versionDate);
if (listModelsOptions != null) {
}
return createServiceCall(builder.build(), ResponseConverterUtils.getObject(ListModelsResults.class));
}
Aggregations