cortexai
v0.1.9
Published
A lightweight TypeScript SDK for interacting with a multi-model OpenAI-compatible API, including Claude 3.5, LLaMA, and DeepSeek.
Maintainers
Readme
cortexAI
An SDK to interact with your own OpenAI-compatible API supporting OpenAI GPT 4o, Claude 3.5 Sonnet, LLaMA Models, DeepSeek r1, and more.
Installation
npm install cortexaiUsage
import chatWithModel from "cortexai";
const response = await chatWithModel({
model: "gpt-4o",
messages: [{ role: "user", content: "Tell me a joke about robots." }],
temperature: 0.7,
});
console.log(response);Supported Models
deepseek-v3deepseek-r1llama-3.3-70bllama-3.2-3bclaude-3.5-sonnetgpt-4o
Parameters
Supports standard OpenAI parameters:
temperature,max_tokens,top_p- Also supports:
top_k,repetition_penalty(viaextra_body)
License
Open source
