Closed lukemovement closed 2 months ago
The first example on Getting started seems to be outdated as it gives a number of TypeScript errors.
import {fileURLToPath} from "url"; import path from "path"; import {LlamaModel, LlamaContext, LlamaChatSession} from "node-llama-cpp"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); const model = new LlamaModel({ modelPath: path.join(__dirname, "models", "codellama-13b.Q3_K_M.gguf") }); const context = new LlamaContext({model}); const session = new LlamaChatSession({context}); const q1 = "Hi there, how are you?"; console.log("User: " + q1); const a1 = await session.prompt(q1); console.log("AI: " + a1); const q2 = "Summerize what you said"; console.log("User: " + q2); const a2 = await session.prompt(q2); console.log("AI: " + a2);
No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.
Additional Context
The first example on Getting started seems to be outdated as it gives a number of TypeScript errors.
Are you willing to resolve this issue by submitting a Pull Request?
No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.