mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-06 11:37:12 +00:00
docs: HuggingFace Endpoint Documentation Fixed (#21914)
Fixed Documentation for HuggingFaceEndpoint as per the issue #21903 --------- Co-authored-by: keenborder786 <mohammad.mohtashim78@gmail.com> Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
parent
25d1c1c9bb
commit
711b8f1e52
@ -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}))"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user