-
-
Notifications
You must be signed in to change notification settings - Fork 155
Closed
Description
I'm running the example script provided in the README.md using a local/offline copy of this library (that should work fine). I get this error when calling the script the first time. I'm not using any specific env, the llama.cpp has been downloaded in the folder of the bindings under llama/llama.cpp:
.
├── example.js
├── lib
│ ├── AbortError.d.ts
│ ├── AbortError.js
│ ├── AbortError.js.map
│ ├── ChatPromptWrapper.d.ts
│ ├── ChatPromptWrapper.js
│ ├── ChatPromptWrapper.js.map
│ ├── chatWrappers
│ ├── cli
│ ├── commands.d.ts
│ ├── commands.js
│ ├── commands.js.map
│ ├── config.d.ts
│ ├── config.js
│ ├── config.js.map
│ ├── index.d.ts
│ ├── index.js
│ ├── index.js.map
│ ├── llamaEvaluator
│ ├── package.json
│ ├── types.d.ts
│ ├── types.js
│ ├── types.js.map
│ └── utils
└── llama
├── addon.cpp
├── binariesGithubRelease.json
├── binding.gyp
├── llama.cpp
└── usedBin.jsonThe example script was
import {fileURLToPath} from "url";
import path from "path";
import {LlamaModel, LlamaContext, LlamaChatSession} from "./lib/index.js";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const model = new LlamaModel({
modelPath: path.join(__dirname, "models", "LaMA-2-7B-32K_GGUF", "LLaMA-2-7B-32K-Q3_K_L.gguf")
});
const context = new LlamaContext({model});
const session = new LlamaChatSession({context});
const q1 = "Hi there, how are you?";
console.log("User: " + q1);Metadata
Metadata
Assignees
Labels
No labels