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

ClassMethodHTTP requestDescription
V1endpointApicreateEndpointPOST /endpointCreate a new endpoint
V1endpointApideleteEndpointDELETE /endpoint/{name}Delete an endpoint
V1endpointApigetEndpointGET /endpoint/{name}Get endpoint information
V1endpointApigetEndpointLogsGET /endpoint/{name}/logsEndpoint replicas logs
V1endpointApigetEndpointMetricPOST /endpoint/{name}/metrics/{metric}Get endpoint metric
V1endpointApilistEndpointGET /endpointList endpoints
V1endpointApiupdateEndpointPUT /endpoint/{name}Update an endpoint
V1providerApilistComputesGET /provider/{vendor}/region/{region}/computeList compute resources available for this provider region\
V1providerApilistRegionsGET /provider/{vendor}/regionList vendor regions
V1providerApilistVendorsGET /providerList vendors
V2endpointApicreateEndpointPOST /v2/endpoint/{namespace}Create a new endpoint
V2endpointApideleteEndpointDELETE /v2/endpoint/{namespace}/{name}Delete an endpoint
V2endpointApigetEndpointGET /v2/endpoint/{namespace}/{name}Get endpoint information
V2endpointApigetEndpointLogsGET /v2/endpoint/{namespace}/{name}/logsEndpoint replicas logs
V2endpointApigetEndpointMetricPOST /v2/endpoint/{namespace}/{name}/metrics/{metric}Get endpoint metric
V2endpointApilistEndpointGET /v2/endpoint/{namespace}List endpoints
V2endpointApipauseEndpointPOST /v2/endpoint/{namespace}/{name}/pausePause endpoint
V2endpointApiresumeEndpointPOST /v2/endpoint/{namespace}/{name}/resumeResume endpoint
V2endpointApiupdateEndpointPUT /v2/endpoint/{namespace}/{name}Update an endpoint
V2providerApilistVendorsGET /v2/providerList vendors, regions and compute resources available

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

token

  • Type: HTTP Bearer authentication

Author