diff --git a/docs/docs/integrations/llms/aleph_alpha.ipynb b/docs/docs/integrations/llms/aleph_alpha.ipynb index 920cadaafa8..7657324d439 100644 --- a/docs/docs/integrations/llms/aleph_alpha.ipynb +++ b/docs/docs/integrations/llms/aleph_alpha.ipynb @@ -27,17 +27,17 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 1, "id": "0cb0f937-b610-42a2-b765-336eed037031", "metadata": { "tags": [] }, "outputs": [ { - "name": "stdin", + "name": "stdout", "output_type": "stream", "text": [ - " ········\n" + "········\n" ] } ], @@ -51,21 +51,20 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 2, "id": "6fb585dd", "metadata": { "tags": [] }, "outputs": [], "source": [ - "from langchain.chains import LLMChain\n", "from langchain.prompts import PromptTemplate\n", "from langchain_community.llms import AlephAlpha" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 3, "id": "f81a230d", "metadata": { "tags": [] @@ -81,7 +80,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 4, "id": "f0d26e48", "metadata": { "tags": [] @@ -98,19 +97,19 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 5, "id": "6811d621", "metadata": { "tags": [] }, "outputs": [], "source": [ - "llm_chain = LLMChain(prompt=prompt, llm=llm)" + "llm_chain = prompt | llm" ] }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 8, "id": "3058e63f", "metadata": { "tags": [] @@ -119,10 +118,10 @@ { "data": { "text/plain": [ - "' Artificial Intelligence (AI) is the simulation of human intelligence processes by machines, especially computer systems.\\n'" + "' Artificial Intelligence is the simulation of human intelligence processes by machines.\\n\\n'" ] }, - "execution_count": 10, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -130,8 +129,16 @@ "source": [ "question = \"What is AI?\"\n", "\n", - "llm_chain.run(question)" + "llm_chain.invoke({\"question\": question})" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a3544eff", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -150,7 +157,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.6" + "version": "3.9.12" }, "vscode": { "interpreter": {