This repo contains SDKs for interacting with the Cogstack ModelServe (CMS) APIs.
CMS is a model serving and governance system for CogStack NLP solutions. The client SDKs in this repo are generated from the OpenAPI specification to provide type-safe, language-native ways to interact with the CMS APIs from your own applications. These cover authentication, NER annotation, streaming and real-time entity extraction and redaction, text embedding, model training and evaluation, annotation statistics and rendering, free text or structured output generation, and other auxiliary functionalities related to model serving and fine-tuning.
To use one of these SDKs, navigate to the specific language directory above and follow the installation instructions provided in the README file.
Java:
importorg.cms.client.ApiClient;
importorg.cms.client.api.AnnotationsApi;
StringcmsBaseUrl = "http://localhost:8000";
ApiClientclient = newApiClient();
client.setBasePath(cmsBaseUrl);
AnnotationsApiapi = newAnnotationsApi(client);
Stringtext = "John had been diagnosed with acute Kidney Failure the week beforel";
varresponse = api.getEntitiesFromText(text);
System.out.println(response);Python:
importcms_clientcms_base_url="http://localhost:8000"configuration=cms_client.Configuration(host=cms_base_url)
withcms_client.ApiClient(configuration) asapi_client:
api_instance=cms_client.AnnotationsApi(api_client)
text="John had been diagnosed with acute Kidney Failure the week before."response=api_instance.get_entities_from_text(text)
print(response)R:
library(cmsClient)
cms_base_url<-"http://localhost:8000"api_instance<-AnnotationsApi$new()
api_instance$api_client$base_path<-cms_base_urltext<-"John had been diagnosed with acute Kidney Failure the week before."response<-api_instance$GetEntitiesFromText(text)
print(response)