mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-10 21:35:08 +00:00
docs: Added LCEL for alibabacloud and anyscale (#17252)
--------- Co-authored-by: KARTHEEK YAKKALA <kartheekyakkala@KARTHEEKs-Air.lan> Co-authored-by: KARTHEEK YAKKALA <kartheekyakkala.se@gmail.com>
This commit is contained in:
parent
a2167614b7
commit
3a22157d92
@ -51,7 +51,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 10,
|
"execution_count": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
@ -66,10 +66,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"llm_chain = LLMChain(prompt=prompt, llm=llm)\n",
|
"llm_chain = prompt | llm\n",
|
||||||
"\n",
|
"\n",
|
||||||
"question = \"What NFL team won the Super Bowl in the year Justin Beiber was born?\"\n",
|
"question = \"What NFL team won the Super Bowl in the year Justin Beiber was born?\"\n",
|
||||||
"llm_chain.run(question)"
|
"llm_chain.invoke({\"question\": question})"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -90,7 +90,7 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"llm_chain = LLMChain(prompt=prompt, llm=llm)"
|
"llm_chain = prompt | llm"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -104,7 +104,7 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"question = \"When was George Washington president?\"\n",
|
"question = \"When was George Washington president?\"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"llm_chain.run(question)"
|
"llm_chain.invoke({\"question\": question})"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user