@metreeca/llms
    Preparing search index...

    Module @metreeca/llms - v0.3.1

    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.

    Important

    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.

    @metreeca/llms

    npm

    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.

    Installation

    npm install @metreeca/gear  # the job executor
    npm install @metreeca/llms # this package
    Important

    Node.js 22 or later is required.

    Warning

    TypeScript consumers must use "moduleResolution": "nodenext"/"node16"/"bundler" in tsconfig.json. The legacy "node" resolver is not supported.

    Usage

    Module Description
    @metreeca/llms AI tasks and shared services

    Support

    • open an issue to report a problem or to suggest a new feature
    • start a discussion to ask a how-to question or to share an idea

    License

    This project is licensed under the Apache 2.0 License – see LICENSE file for details.

    Vector

    A vector.

    Distance

    A distance between two vectors.

    synopsis

    Builds the synopsis of a resource.

    cosine

    Computes the cosine distance between two vectors.

    compress

    Compresses a vector to a compact textual form.

    decompress

    Decompresses a vector from its compact textual form.