Skip to content
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

GPT4All callup failure #9786

Closed
3 of 14 tasks
gillsgills opened this issue Aug 26, 2023 · 2 comments
Closed
3 of 14 tasks

GPT4All callup failure #9786

gillsgills opened this issue Aug 26, 2023 · 2 comments
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature Ɑ: models Related to LLMs or chat model modules

Comments

@gillsgills
Copy link

System Info

Colab environment
LangChain version: 0.0.152

Who can help?

No response

Information

  • The official example notebooks/scripts
  • My own modified scripts

Related Components

  • LLMs/Chat Models
  • Embedding Models
  • Prompts / Prompt Templates / Prompt Selectors
  • Output Parsers
  • Document Loaders
  • Vector Stores / Retrievers
  • Memory
  • Agents / Agent Executors
  • Tools / Toolkits
  • Chains
  • Callbacks/Tracing
  • Async

Reproduction

Please follow the tutorial here and run the code below to reproduce

template = """Question: {question}

Answer: Let's answer in two sentence while being funny."""

prompt = PromptTemplate(template=template, input_variables=["question"])

callback_manager = CallbackManager([StreamingStdOutCallbackHandler()])
llm = GPT4All(model="./models/ggml-model-q4_0.bin", callback_manager=callback_manager, verbose=True)
llm_chain = LLMChain(prompt=prompt, llm=llm)

question = "What happens when it rains somewhere?"
llm_chain.run(question)

Expected behavior

TypeError: GPT4All.generate() got an unexpected keyword argument 'n_ctx'

@dosubot dosubot bot added Ɑ: models Related to LLMs or chat model modules 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Aug 26, 2023
@dosubot
Copy link

dosubot bot commented Aug 26, 2023

🤖

Hello,

Thank you for reaching out and providing detailed information about the issue you're facing. The error message "TypeError: GPT4All.generate() got an unexpected keyword argument 'n_ctx'" indicates that the 'n_ctx' argument is not expected by the GPT4All.generate() method.

Based on the context provided, it seems that there have been similar issues in the past. One of the solutions suggested was to downgrade the pygpt4all package to version 1.0.1 using the command pip install 'pygpt4all==v1.0.1' --force-reinstall. This should resolve the TypeError encountered when using the GPT4All model. You can find more details about this solution in this issue.

Another solution was to downgrade the package versions to pydantic==1.10.10, gpt4all==0.3.4, and langchain==0.0.197. Alternatively, upgrading to Python version > 3.10 can also resolve the problem as the latest versions of langchain and gpt4all work perfectly fine on Python > 3.10 without hitting the validationErrors on pydantic. You can find more details about this solution in this issue.

Please try these solutions and let us know if the issue persists. We're here to help!

Best,
Dosu

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

Copy link

dosubot bot commented Dec 11, 2023

Hi, @gillsgills

I'm helping the LangChain team manage their backlog and am marking this issue as stale. The issue you raised was about a TypeError encountered when running the GPT4All model using a specific code snippet in a Colab environment. It looks like the issue has been resolved by downgrading the pygpt4all package to version 1.0.1 or downgrading other related package versions, as suggested by me.

Could you please confirm if this issue is still relevant to the latest version of the LangChain repository? If it is, please let the LangChain team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Dec 11, 2023
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2023
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature Ɑ: models Related to LLMs or chat model modules
Projects
None yet
Development

No branches or pull requests

1 participant