Skip to main content
This release is 11 versions behind 2.0.0 — the latest version of @open-schemas/types. Jump to latest

Type definitions for the API of LLM providers.

Works with
This package works with Bun
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Browsers
JSR Score
100%
Published
3 weeks ago

@open-schemas/types

Typescript types for the API of LLM providers:

  • Anthropic
  • Ollama
  • OpenAI
  • Vertex AI

Installtion

From npm

deno add npm:@open-schemas/types
npm add @open-schemas/types
yarn add @open-schemas/types
pnpm add @open-schemas/types
bun add @open-schemas/types

From JSR

deno add @open-schemas/types
npx jsr add @open-schemas/types
yarn dlx jsr add @open-schemas/types
pnpm dlx jsr add @open-schemas/types
bunx jsr add @open-schemas/types

Usage

Anthropic

import { CreateMessageRequest } from "@open-schemas/types/anthropic";

const request: CreateMessageRequest = {};

OpenAI

import { CreateChatCompletionRequest } from "@open-schemas/types/openai";

const request: CreateChatCompletionRequest = {};