Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 663 Bytes

README.md

File metadata and controls

36 lines (26 loc) · 663 Bytes

@hoangvvo/llm-sdk in JavaScript

A unified LLM API.

Installation

npm install @hoangvvo/llm-sdk

Usage

Create a model instance:

import { OpenAIModel } from "@hoangvvo/llm-sdk/openai";
// or
import { GoogleModel } from "@hoangvvo/llm-sdk/google";
// or
import { AnthropicModel } from "@hoangvvo/llm-sdk/anthropic";
// or
import { CohereModel } from "@hoangvvo/llm-sdk/cohere";
// or
import { MistralModel } from "@hoangvvo/llm-sdk/mistral";

const model = new OpenAIModel({
  apiKey: "openai-api-key",
  modelId: "gpt-3.5-turbo",
});

See examples or test cases for more details.

License

MIT