diff --git a/docs/docs/integrations/llm_caching.ipynb b/docs/docs/integrations/llm_caching.ipynb index 3c88ae1fd5af7..5356f90a7537c 100644 --- a/docs/docs/integrations/llm_caching.ipynb +++ b/docs/docs/integrations/llm_caching.ipynb @@ -14,26 +14,10 @@ }, { "cell_type": "code", - "execution_count": 1, - "id": "88486f6f", - "metadata": { - "ExecuteTime": { - "end_time": "2024-12-06T00:53:54.575978Z", - "start_time": "2024-12-06T00:53:38.515785Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001B[33mWARNING: Ignoring invalid distribution ~angchain (/Users/aayushkataria/anaconda3/lib/python3.11/site-packages)\u001B[0m\u001B[33m\r\n", - "\u001B[0m\u001B[33mWARNING: Ignoring invalid distribution ~angchain (/Users/aayushkataria/anaconda3/lib/python3.11/site-packages)\u001B[0m\u001B[33m\r\n", - "\u001B[0m\u001B[33mWARNING: Ignoring invalid distribution ~angchain (/Users/aayushkataria/anaconda3/lib/python3.11/site-packages)\u001B[0m\u001B[33m\r\n", - "\u001B[0mNote: you may need to restart the kernel to use updated packages.\n" - ] - } - ], + "execution_count": null, + "id": "f938e881", + "metadata": {}, + "outputs": [], "source": [ "%pip install -qU langchain-openai langchain-community\n", "\n", @@ -1836,7 +1820,7 @@ }, { "cell_type": "code", - "execution_count": 83, + "execution_count": null, "id": "bc1570a2a77b58c8", "metadata": { "ExecuteTime": { @@ -1866,7 +1850,7 @@ ], "source": [ "%%time\n", - "# The first time, it is not yet in cache, so it should take longer\n", + "# The second time it is, so it goes faster\n", "llm.invoke(\"Tell me a joke\")" ] }, @@ -1882,7 +1866,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "41fea5aa7b2153ca", "metadata": { "ExecuteTime": { @@ -1895,12 +1879,9 @@ "from typing import Any, Dict\n", "\n", "from azure.cosmos import CosmosClient, PartitionKey\n", - "\n", - "# from langchain_community.cache import AzureCosmosDBNoSqlSemanticCache\n", + "from langchain_community.cache import AzureCosmosDBNoSqlSemanticCache\n", "from langchain_openai import OpenAIEmbeddings\n", "\n", - "from libs.community.langchain_community.cache import AzureCosmosDBNoSqlSemanticCache\n", - "\n", "HOST = \"COSMOS_DB_URI\"\n", "KEY = \"COSMOS_DB_KEY\"\n", "\n", @@ -1982,7 +1963,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "576ce24c1244812a", "metadata": { "ExecuteTime": { @@ -2012,7 +1993,7 @@ ], "source": [ "%%time\n", - "# The first time, it is not yet in cache, so it should take longer\n", + "# The second time it is, so it goes faster\n", "llm.invoke(\"Tell me a joke\")" ] },