CogStack Model Serve APIs
Project description
cms_client
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 0.1.0
- Package version: 0.0.1
- Generator version: 7.14.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements.
Python 3.9+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)
Then import the package:
import cms_client
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import cms_client
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import cms_client
from cms_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cms_client.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Configure API key authorization: APIKeyCookie
configuration.api_key['APIKeyCookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyCookie'] = 'Bearer'
# Enter a context with an instance of the API client
with cms_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cms_client.AnnotationsApi(api_client)
multi_text_file = None # bytearray | A file containing a list of plain texts, in the format of [\\\"text_1\\\", \\\"text_2\\\", ..., \\\"text_n\\\"]
tracking_id = 'tracking_id_example' # str | The tracking ID of the requested task (optional)
try:
# Extract Entities From Multi Text File
api_instance.extract_entities_from_multi_text_file(multi_text_file, tracking_id=tracking_id)
except ApiException as e:
print("Exception when calling AnnotationsApi->extract_entities_from_multi_text_file: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to http://localhost
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AnnotationsApi | extract_entities_from_multi_text_file | POST /process_bulk_file | Extract Entities From Multi Text File |
| AnnotationsApi | get_entities_from_jsonlines_text | POST /process_jsonl | Get Entities From Jsonlines Text |
| AnnotationsApi | get_entities_from_multiple_texts | POST /process_bulk | Get Entities From Multiple Texts |
| AnnotationsApi | get_entities_from_text | POST /process | Get Entities From Text |
| AnnotationsApi | get_entities_stream_from_jsonlines_stream | POST /stream/process | Get Entities Stream From Jsonlines Stream |
| AuthenticationApi | auth_cookie_login | POST /auth/cookie/login | Auth:Cookie.Login |
| AuthenticationApi | auth_cookie_logout | POST /auth/cookie/logout | Auth:Cookie.Logout |
| AuthenticationApi | auth_jwt_login | POST /auth/jwt/login | Auth:Jwt.Login |
| AuthenticationApi | auth_jwt_logout | POST /auth/jwt/logout | Auth:Jwt.Logout |
| EvaluatingApi | get_annotation_stats | POST /annotation-stats | Get Annotation Stats |
| EvaluatingApi | get_concatenated_trainer_exports | POST /concat_trainer_exports | Get Concatenated Trainer Exports |
| EvaluatingApi | get_inter_annotator_agreement_scores | POST /iaa-scores | Get Inter Annotator Agreement Scores |
| EvaluatingApi | get_sanity_check_with_trainer_export | POST /sanity-check | Get Sanity Check With Trainer Export |
| GenerateTextBasedOnTheInputPromptApi | generate_text | POST /generate | Generate Text |
| GenerateTextBasedOnTheInputPromptApi | generate_text_stream | POST /stream/generate | Generate Text Stream |
| MetadataApi | get_model_card | GET /info | Get Model Card |
| OpenAICompatibleApi | embed_texts | POST /v1/embeddings | Embed Texts |
| OpenAICompatibleApi | generate_chat_completions | POST /v1/chat/completions | Generate Chat Completions |
| RedactionApi | get_redacted_text | POST /redact | Get Redacted Text |
| RedactionApi | get_redacted_text_with_encryption | POST /redact_with_encryption | Get Redacted Text With Encryption |
| RenderingApi | get_rendered_entities_from_text | POST /preview | Get Rendered Entities From Text |
| RenderingApi | get_rendered_entities_from_trainer_export | POST /preview_trainer_export | Get Rendered Entities From Trainer Export |
| TrainingApi | cancel_training | POST /cancel_training | Cancel Training |
| TrainingApi | get_evaluation_with_trainer_export | POST /evaluate | Get Evaluation With Trainer Export |
| TrainingApi | train_eval_info | GET /train_eval_info | Train Eval Info |
| TrainingApi | train_eval_metrics | GET /train_eval_metrics | Train Eval Metrics |
| TrainingApi | train_metacat | POST /train_metacat | Train Metacat |
| TrainingApi | train_supervised | POST /train_supervised | Train Supervised |
| TrainingApi | train_unsupervised | POST /train_unsupervised | Train Unsupervised |
| TrainingApi | train_unsupervised_with_hf_dataset | POST /train_unsupervised_with_hf_hub_dataset | Train Unsupervised With Hf Dataset |
Documentation For Models
- Annotation
- BearerResponse
- Detail
- ErrorModel
- HTTPValidationError
- Input
- ModelCard
- ModelType
- OpenAIChatRequest
- OpenAIEmbeddingsRequest
- PromptMessage
- PromptRole
- TextWithAnnotations
- TextWithPublicKey
- ValidationError
- ValidationErrorLocInner
Documentation For Authorization
Authentication schemes defined for the API:
OAuth2PasswordBearer
- Type: OAuth
- Flow: password
- Authorization URL:
- Scopes: N/A
APIKeyCookie
- Type: API key
- API key parameter name: fastapiusersauth
- Location:
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file cms_client-0.0.1.tar.gz.
File metadata
- Download URL: cms_client-0.0.1.tar.gz
- Upload date:
- Size: 46.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c8bed741866dc50260af1f4f61c1eec05bd01a32bf787cd51845567f01a69a2
|
|
| MD5 |
a2678cdf1df644f9ca0c1b5e9bac9c19
|
|
| BLAKE2b-256 |
f25c24781640e4948f0082725da688a77cb52a681b38e6341a170040ce0c4b14
|