litllm
v5.0.1
Published
I'd give it a perfect 6/7
Downloads
46
Readme
litllm
14.285714 (repeating of course) percent fewer letters than litellm.
word2vec("litellm") - word2vec("🐍") + word2vec("🤯") === word2vec("litllm") // probably
Setup
npm i litllm
OpenAI:
lit.js:
const { completion } = require("litllm");
process.env["OPENAI_API_KEY"] = "sk-wouldntyouliketoknow";
completion("gpt-4", [{ role: "user", content: "What's lit?" }]).then((res) => {
console.log(res.message.content);
});
Anthropic:
lit.js:
const { completion } = require("litllm");
process.env["ANTHROPIC_API_KEY"] = "sk-ant-wouldntyouliketoknow";
completion("claude-2", [{ role: "user", content: "What's lit?" }]).then((res) => {
console.log(res.message.content);
});
Llama2 Replicate:
lit.js:
const { completion } = require("litllm");
process.env["REPLICATE_API_TOKEN"] = "r8_wouldntyouliketoknow"; // 🎩 cause i'm a token
completion("Llama-2-70b-chat-4bit", [{ role: "user", content: "What's lit?" }]).then((res) => {
console.log(res.message.content);
});
Run
node lit.js