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:
Kartheek Yakkala 2024-02-08 15:18:09 -06:00 committed by GitHub
parent a2167614b7
commit 3a22157d92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -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})"
] ]
} }
], ],

View File

@ -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})"
] ]
}, },
{ {