@metreeca/llms
    Preparing search index...

    Module @metreeca/llms-openai - v0.3.1

    OpenAI model connectors.

    Connects AI jobs to OpenAI models, ready to work alongside any other task in a pipeline. Long runs proceed reliably to completion, and every result a job receives from a model can be trusted as complete.

    @metreeca/llms-openai

    npm

    OpenAI model connectors for @metreeca/llms.

    Connects AI jobs to OpenAI models, ready to work alongside any other task in a pipeline. Long runs proceed reliably to completion, and every result a job receives from a model can be trusted as complete.

    Installation

    npm install @metreeca/gear         # the job executor
    npm install @metreeca/llms # AI tasks and shared services
    npm install @metreeca/llms-openai # 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

    See the API reference.

    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.

    createOpenAI

    Creates an OpenAI API client paced against the published rate quotas.

    text

    Extracts the output text of a chat completion.

    json

    Extracts the output text of a chat completion as a JSON payload.

    embedding

    Extracts the embedding of an OpenAI API response.