huggingface_client 1.6.2
SDKdartflutter
Platformandroidioswindowslinuxmacosweb
A server and browser based Hugging Face inference and inference endpoint API REST client
openapi
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
This Dart package is automatically generated by the OpenAPI Generator project:
- API version: 0.1.0
- Build package: org.openapitools.codegen.languages.DartClientCodegen
Requirements
Dart 2.12 or later
Installation & Usage
Github
If this Dart package is published to Github, add the following dependency to your pubspec.yaml
dependencies:
openapi:
git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
Local
To use the package in your local drive, add the following dependency to your pubspec.yaml
dependencies:
openapi:
path: /path/to/openapi
Tests
TODO
Getting Started
Please follow the installation procedure and then run the following:
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: token
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('token').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('token').setAccessToken(yourTokenGeneratorFunction);
final api_instance = V1endpointApi();
final endpoint = Endpoint(); // Endpoint |
try {
final result = api_instance.createEndpoint(endpoint);
print(result);
} catch (e) {
print('Exception when calling V1endpointApi->createEndpoint: $e\n');
}
Documentation for API Endpoints
All URIs are relative to http://localhost
| Class | Method | HTTP request | Description |
|---|---|---|---|
| V1endpointApi | createEndpoint | POST /endpoint | Create a new endpoint |
| V1endpointApi | deleteEndpoint | DELETE /endpoint/{name} | Delete an endpoint |
| V1endpointApi | getEndpoint | GET /endpoint/{name} | Get endpoint information |
| V1endpointApi | getEndpointLogs | GET /endpoint/{name}/logs | Endpoint replicas logs |
| V1endpointApi | getEndpointMetric | POST /endpoint/{name}/metrics/{metric} | Get endpoint metric |
| V1endpointApi | listEndpoint | GET /endpoint | List endpoints |
| V1endpointApi | updateEndpoint | PUT /endpoint/{name} | Update an endpoint |
| V1providerApi | listComputes | GET /provider/{vendor}/region/{region}/compute | List compute resources available for this provider region\ |
| V1providerApi | listRegions | GET /provider/{vendor}/region | List vendor regions |
| V1providerApi | listVendors | GET /provider | List vendors |
| V2endpointApi | createEndpoint | POST /v2/endpoint/{namespace} | Create a new endpoint |
| V2endpointApi | deleteEndpoint | DELETE /v2/endpoint/{namespace}/{name} | Delete an endpoint |
| V2endpointApi | getEndpoint | GET /v2/endpoint/{namespace}/{name} | Get endpoint information |
| V2endpointApi | getEndpointLogs | GET /v2/endpoint/{namespace}/{name}/logs | Endpoint replicas logs |
| V2endpointApi | getEndpointMetric | POST /v2/endpoint/{namespace}/{name}/metrics/{metric} | Get endpoint metric |
| V2endpointApi | listEndpoint | GET /v2/endpoint/{namespace} | List endpoints |
| V2endpointApi | pauseEndpoint | POST /v2/endpoint/{namespace}/{name}/pause | Pause endpoint |
| V2endpointApi | resumeEndpoint | POST /v2/endpoint/{namespace}/{name}/resume | Resume endpoint |
| V2endpointApi | updateEndpoint | PUT /v2/endpoint/{namespace}/{name} | Update an endpoint |
| V2providerApi | listVendors | GET /v2/provider | List vendors, regions and compute resources available |
Documentation For Models
- Accelerator
- ApiResponseError
- Compute
- ComputeList
- Endpoint
- EndpointAccelerator
- EndpointAccount
- EndpointCompute
- EndpointComputeUpdate
- EndpointFramework
- EndpointImageCredentials
- EndpointModel
- EndpointModelImage
- EndpointModelImageOneOf
- EndpointModelImageOneOf1
- EndpointModelImageOneOf1Custom
- EndpointModelImageUpdate
- EndpointModelImageUpdateOneOf
- EndpointModelImageUpdateOneOfCustom
- EndpointModelUpdate
- EndpointProvider
- EndpointScaling
- EndpointScalingUpdate
- EndpointState
- EndpointStatus
- EndpointStatusPrivate
- EndpointTask
- EndpointType
- EndpointUpdate
- EndpointWithStatus
- EndpointWithStatusList
- MetricName
- MetricsParams
- Region
- RegionList
- Status
- Vendor
- VendorList
- Vendors
Documentation For Authorization
Authentication schemes defined for the API:
token
- Type: HTTP Bearer authentication