Skip to content

using gpt4all for same code #6

@VishnuAK9000

Description

@VishnuAK9000

I replaced the open ai llm with gpt4all llm but I am getting following error

AttributeError: 'LLModel' object has no attribute 'model_type'
Traceback:
File "C:\Users\vishnu.a2\AppData\Roaming\Python\Python311\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "D:\langchain_csv-main\interface.py", line 66, in
agent = create_agent(data)
^^^^^^^^^^^^^^^^^^
File "D:\langchain_csv-main\agent.py", line 20, in create_agent
llm = GPT4All(model=local_path, n_ctx=1000, backend='gptj', n_batch=8, callbacks=callbacks, verbose=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pydantic\main.py", line 339, in pydantic.main.BaseModel.init
File "pydantic\main.py", line 1102, in pydantic.main.validate_model
File "C:\Users\vishnu.a2\AppData\Roaming\Python\Python311\site-packages\langchain\llms\gpt4all.py", line 156, in validate_environment
values["backend"] = values["client"].model.model_type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions