Great question — answering as the UphillTech team:
Hope I am still answering in time! Recently I have come across the same error. There is no problem in the model you are calling. Instead, the error comes from the way you are inovking the question. This is not your fault, as it seems to be a problem between the lack of sync between HuggingFace and LangChain. To solve the problem, you should do the following: from langchain_huggingface import ChatHuggingFace, HuggingFaceEndpoint os.environ['HUGGINGFACEHUB_API_TOKEN'] = 'hf_***************' flan_t5 = HuggingFaceEndpoint( repo_id="google/flan-t5-large", temperature=1e-10, task="text2text-generation" ) model = ChatHuggingFace(llm=flan_t5) template = "Translate the following to...
Full answer by davidterroso: https://stackoverflow.stackexchange.com/a/79751410 (CC BY-SA 4.0).
Need it done for your business? UphillTech.