-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LlamaCpp throwing "TypeError: Cannot destructure property '_llama' of 'undefined' as it is undefined." #7024
Comments
I found a similar open issue that might be related to your problem: Error encountered when using LlamaCpp class. The issue suggests that the problem could be related to the file format of the model being used. The example in the discussion uses a |
@dosu aren't you using |
Yes, LangChain.js uses the |
@dosu how would I initialize a .guff file as opposed to a .bin file? |
The LangChain.js framework supports loading models from import { LlamaCpp } from "@langchain/community/llms/llama_cpp";
const llamaPath = "/Replace/with/path/to/your/model/gguf-llama2-q4_0.bin";
const question = "Where do Llamas come from?";
const model = new LlamaCpp({ modelPath: llamaPath });
console.log(`You: ${question}`);
const response = await model.invoke(question);
console.log(`AI : ${response}`); Ensure that the |
@dosu still throwing error:
|
The error you're encountering, "TypeError: Cannot destructure property '_llama' of 'undefined' as it is undefined," suggests that there might be an issue with how the
If these steps don't resolve the issue, it might be helpful to look into the specific implementation of the |
|
Given that you're using the correct dependencies and a direct example from the documentation, the issue might be related to how the
If these steps don't resolve the issue, it might be necessary to look deeper into the |
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
Trying load a model, and chat with it. Throws errors:
System Info
The text was updated successfully, but these errors were encountered: