Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CMS Client

Java Python R

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.

Usage

To use one of these SDKs, navigate to the specific language directory above and follow the installation instructions provided in the README file.

Examples

Entity extraction

Java:

import org.cms.client.ApiClient;
import org.cms.client.api.AnnotationsApi;

String cmsBaseUrl = "http://localhost:8000";
ApiClient client = new ApiClient();
client.setBasePath(cmsBaseUrl);
AnnotationsApi api = new AnnotationsApi(client);
String text = "John had been diagnosed with acute Kidney Failure the week beforel";
var response = api.getEntitiesFromText(text);
System.out.println(response);

Python:

import cms_client

cms_base_url = "http://localhost:8000"
configuration = cms_client.Configuration(host=cms_base_url)
with cms_client.ApiClient(configuration) as api_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_url
text <- "John had been diagnosed with acute Kidney Failure the week before."
response <- api_instance$GetEntitiesFromText(text)
print(response)

About

SDKs for interacting with the CogStack ModelServe APIs

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages