@abliteration/sdk
v0.1.8
Published
OpenAPI client for @abliteration/sdk
Readme
@abliteration/[email protected]
A TypeScript SDK client for the abliteration.org API.
Usage
First, install the SDK from npm.
npm install @abliteration/sdk --saveNext, try it out.
import {
Configuration,
AuthorsApi,
} from '@abliteration/sdk';
import type { GetAuthorRequest } from '@abliteration/sdk';
async function example() {
console.log("🚀 Testing @abliteration/sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: bearerAuth
accessToken: "YOUR BEARER TOKEN",
});
const api = new AuthorsApi(config);
const body = {
// string
id: mlabonne,
} satisfies GetAuthorRequest;
try {
const data = await api.getAuthor(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);Documentation
API Endpoints
All URIs are relative to https://abliteration.org
| Class | Method | HTTP request | Description | ----- | ------ | ------------ | ------------- AuthorsApi | getAuthor | GET /api/v1/authors/{id} | Get one author AuthorsApi | listAuthors | GET /api/v1/authors | List authors DatasetsApi | getDataset | GET /api/v1/datasets/{id} | Get one dataset DatasetsApi | listDatasets | GET /api/v1/datasets | List datasets IndicesApi | getIndex | GET /api/v1/indices/{id} | One index with history IndicesApi | listIndices | GET /api/v1/indices | All four indices MethodsApi | getMethod | GET /api/v1/methods/{id} | Get one method MethodsApi | listMethods | GET /api/v1/methods | List the method taxonomy ModelsApi | getHistoricalDeletionSummary | GET /api/v1/models/historical-deletions/summary | Historical deletions — aggregate summary ModelsApi | getModel | GET /api/v1/models/{id} | Get one model ModelsApi | getModelDownloadHistory | GET /api/v1/models/{id}/download-history | Per-model download timeline ModelsApi | getModelReadmeAt | GET /api/v1/models/{id}/readme-at/{commit} | README content at one commit (wayback) ModelsApi | listAnomalies | GET /api/v1/market/anomalies | Anomalies in the download counter (change stream) ModelsApi | listDelistedModels | GET /api/v1/models/delisted | List delisted models (change stream) ModelsApi | listHistoricalDeletions | GET /api/v1/models/historical-deletions/list | Historical deletions — paged list ModelsApi | listModelReadmeDrifts | GET /api/v1/models/{id}/drifts | README drift stream for one model ModelsApi | listModels | GET /api/v1/models | List models TimelineApi | listTimeline | GET /api/v1/timeline | Curated field events
Models
- Author
- AuthorDetail
- DaiPoint
- Dataset
- DatasetDetail
- DeletionSummary
- DeletionSummaryTimelineInner
- DeletionSummaryTopByDownloadsInner
- DelistedModel
- DownloadAnomaly
- DownloadPoint
- Envelope
- Event
- GetAuthor200Response
- GetDataset200Response
- GetHistoricalDeletionSummary200Response
- GetIndex200Response
- GetMethod200Response
- GetModel200Response
- GetModelDownloadHistory200Response
- GetModelReadmeAt200Response
- HistoricalDeletion
- IndexDetail
- ListAnomalies200Response
- ListAuthors200Response
- ListDatasets200Response
- ListDelistedModels200Response
- ListHistoricalDeletions200Response
- ListIndices200Response
- ListMethods200Response
- ListModelReadmeDrifts200Response
- ListModels200Response
- ListTimeline200Response
- Method
- MethodDetail
- MethodDetailAllOfTopAuthors
- ModelDetail
- ModelError
- ModelIndex
- ModelSummary
- Passport
- ReadmeAt
- ReadmeDrift
Authorization
Authentication schemes defined for the API:
bearerAuth
- Type: HTTP Bearer Token authentication
About
This TypeScript SDK client supports the Fetch API and is automatically generated by the OpenAPI Generator project:
- API version:
1.0.0 - Package version:
0.1.0 - Generator version:
7.25.0 - Build package:
org.openapitools.codegen.languages.TypeScriptFetchClientCodegen
The generated npm module supports the following:
- Environments
- Node.js
- Webpack
- Browserify
- Language levels
- ES5 - you must have a Promises/A+ library installed
- ES6
- Module systems
- CommonJS
- ES6 module system
For more information, please visit https://abliteration.org/api
Development
Building
To build the TypeScript source code, you need to have Node.js and npm installed. After cloning the repository, navigate to the project directory and run:
npm install
npm run buildPublishing
Once you've built the package, you can publish it to npm:
npm publish