Skip to content

The agent engineering platform.

docs: HuggingFace Endpoint Documentation Fixed (#21914)

Mohammad Mohtashim711b8f1e527c
diff --git a/docs/docs/integrations/llms/huggingface_endpoint.ipynb b/docs/docs/integrations/llms/huggingface_endpoint.ipynb
index fbb5f8ee9f..dc177d908b 100644
--- a/docs/docs/integrations/llms/huggingface_endpoint.ipynb
+++ b/docs/docs/integrations/llms/huggingface_endpoint.ipynb
@@ -131,10 +131,13 @@
"repo_id = \"mistralai/Mistral-7B-Instruct-v0.2\"\n",
"\n",
"llm = HuggingFaceEndpoint(\n",
- " repo_id=repo_id, max_length=128, temperature=0.5, token=HUGGINGFACEHUB_API_TOKEN\n",
+ " repo_id=repo_id,\n",
+ " max_length=128,\n",
+ " temperature=0.5,\n",
+ " huggingfacehub_api_token=HUGGINGFACEHUB_API_TOKEN,\n",
")\n",
- "llm_chain = LLMChain(prompt=prompt, llm=llm)\n",
- "print(llm_chain.run(question))"
+ "llm_chain = prompt | llm\n",
+ "print(llm_chain.invoke({\"question\": question}))"
]
},
{