An unofficial library for interaction with Yandex Neuro API, which supports working with JavaScript, TypeScript, and also has built-in parted types for Typebox.
Warning
The library was created exclusively for research purposes and isn't intended for commercial use. All rights to the original software belong to their respective right holders. The library isn't affiliated with the original rights holders
Now library supports working with:
- summarize video from YouTube
- summarize articles
- summarize text
- get link to summarized articles (of. api, need API-key)
- get exists summarized data by token (
https://300.ya.ru/TOKEN
)
The library supports working with worker servers, to do this, you need to create a NeuroWorkerClient
client and specify the domain of the worker server, for example neuro-worker.toil.cc
.
Warning
To work with Node.js or with Browser you need to perform additional configuration or use with neuro-worker. All examples can be seen here
Install via Bun:
bun install @toil/neurojs
Install via Node:
npm install @toil/neurojs
To start working with API, you need to create NeuroClient. This can be done using the line provided below
Standard client:
const client = new NeuroClient();
const result = await client.summarizeVideo({
url: "...",
language: "en",
});
const result2 = await client.summarizeText({
text: "Super long text (300+ symbols)...",
});
const result3 = await client.summarizeArticle({
url: "https://toil.cc",
});
const result4 = await client.getSharingContent({
token: "hoOAM7gs",
});
Proxying via neuro-worker:
const client = new NeuroWorkerClient({
host: "neuro-worker.toil.cc/browser",
hostTH: "neuro-worker.toil.cc/th",
});
You can see more code examples here
To build, you must have:
Don't forget to install the dependencies:
bun install
Start building:
bun build:all
Build without updating proto and without generating docs:
bun build:skip-proto
The library has minimal test coverage to check its performance.
Run the tests:
bun test