-
Notifications
You must be signed in to change notification settings - Fork 76
using gpt4all for same code #6
Description
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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^