Run AI ✨ assistant locally! with simple API for Node.js 🚀
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] 5 months ago
You can use the model with node-llama-cpp@beta
CatAI enables you to easily manage the models and chat with them.
import {downloadModel, getModelPath} from 'catai';
// download the model, skip if you already have the model
await downloadModel(
"https://huggingface.co/QuantFactory/Meta-Llama-3-8B-Instruct-GGUF/resolve/main/Meta-Llama-3-8B-Instruct.Q2_K.gguf?download=true",
"llama3"
);
// get the model path with catai
const modelPath = getModelPath("llama3");
const llama = await getLlama();
const model = await llama.loadModel({
modelPath
});
const context = await model.createContext();
const session = new LlamaChatSession({
contextSequence: context.getSequence()
});
const a1 = await session.prompt("Hi there, how are you?");
console.log("AI: " + a1);
Published by github-actions[bot] 10 months ago
Published by github-actions[bot] 10 months ago