langchain
langchain copied to clipboard
import langchain (0.0.119) does not work
I just upgraded to the most recent version of langchain (0.0.119) and I get the following error when I try to import langchain in python.
Here's the error message:
--> 111 class SelfHostedHuggingFaceLLM(SelfHostedPipeline, BaseModel):
112 Wrapper around HuggingFace Pipeline API to run on self-hosted remote hardware.
113
114 Supported hardware includes auto-launched instances on AWS, GCP, Azure,
149 model_load_fn=get_pipeline, model_id="gpt2", hardware=gpu)
150 152 model_id: str = DEFAULT_MODEL_ID
File ~/.local/lib/python3.9/site-packages/pydantic/main.py:254, in pydantic.main.ModelMetaclass.__new__()
File ~/.local/lib/python3.9/site-packages/pydantic/utils.py:144, in pydantic.utils.validate_field_name()
NameError: Field name inference_fn shadows a BaseModel attribute; use a different field name with alias=inference_fn
Any help will be appreciated.
Thanks in advance