hwchase17 / langchain-hub

3.26k stars 267 forks source link

encountered error when using load_chain #30

Open xin007-kong opened 1 year ago

xin007-kong commented 1 year ago

When I exectuted the code below

from langchain.chains import load_chain

chain = load_chain("lc://chains/llm-math/chain.json")

I met the following error ValueError: Could not find file at https://raw.githubusercontent.com/hwchase17/langchain-hub/master/chains\llm-math\chain.json

SDcodehub commented 1 year ago

based of path you have pasted looks like the path is wrong, post \llm-math\chain.json

I think chain = load_chain(r"lc://chains/llm-math/chain.json") will work

anyhow it is deprecated

C:\Users\sagar.desai\Anaconda3\envs\GenAI\lib\site-packages\langchain\chains\llm_math\base.py:50: UserWarning: Directly instantiating an LLMMathChain with an llm is deprecated. Please instantiate with llm_chain argument or using the from_llm class method.
  warnings.warn(