I'm trying to create an agent that uses HuggingFace models and also uses internet search to answer the queries
import osimport getpassfrom langchain.agents import load_toolsfrom langchain.agents import initialize_agentfrom langchain.llms import OpenAIfrom langchain.agents import load_huggingface_toolfrom langchain import PromptTemplate, HuggingFaceHub, LLMChainos.environ\["HUGGINGFACEHUB_API_TOKEN"\] = getpass.getpass("HF Token:")llm = HuggingFaceHub(repo_id="huggingfaceh4/zephyr-7b-alpha",model_kwargs={"temperature": 0.5, "max_length": 64, "max_new_tokens": 512},)tools = load_tools(\["ddg-search"\], llm=llm)agent = initialize_agent(tools, llm, agent="zero-shot-react-description", verbose=True)agent.run("What is LangChain and how does it work? ")
But I keep getting Observation: the action to take, should be one of [duckduckgo_search] is not a valid tool, try one of [duckduckgo_search].
and it just keeps looping without any useful error. How can I fix this?
Thank you