AI tasks and shared services for @metreeca/llms.
Provides primitives for working with embedding vectors from any model provider: condensing the fields of a resource into the text to be embedded, ranking vectors by semantic proximity, and storing them in a compact textual form.
Jobs using them are set up and run under the @metreeca/gear job executor. This package contributes building blocks for those jobs, not an execution runtime of its own.
npm install @metreeca/gear # the job executor
npm install @metreeca/llms # this package
Node.js 22 or later is required.
TypeScript consumers must use "moduleResolution": "nodenext"/"node16"/"bundler" in tsconfig.json.
The legacy "node" resolver is not supported.
| Module | Description |
|---|---|
| @metreeca/llms | AI tasks and shared services |
This project is licensed under the Apache 2.0 License – see LICENSE file for details.
Builds the synopsis of a resource.
Computes the cosine distance between two vectors.
Compresses a vector to a compact textual form.
Decompresses a vector from its compact textual form.
AI tasks and shared services.
Provides primitives for working with embedding vectors from any model provider. A consumer can condense the fields of a resource into the text to embed, rank vectors by semantic proximity, and store them compactly as text.
Jobs are set up and run with the executor, binder and service locator from @metreeca/gear. This package contributes building blocks for those jobs, not an execution runtime of its own, and leaves service binding and resource release to the executor.