From 841e5f514eb65813084510c033da2eaf515c0ba5 Mon Sep 17 00:00:00 2001 From: Naveenkhasyap Date: Tue, 13 Feb 2024 06:39:38 +0530 Subject: [PATCH] docs: Updated doc for integrations/chat/anthropic_functions #15664 (#17226) Description: Updated doc for integrations/chat/anthropic_functions with new functions: invoke. Changed structure of the document to match the required one. Issue: https://github.com/langchain-ai/langchain/issues/15664 Dependencies: None Twitter handle: None --------- Co-authored-by: NaveenMaltesh --- .../chat/anthropic_functions.ipynb | 41 +++++-------------- 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/docs/docs/integrations/chat/anthropic_functions.ipynb b/docs/docs/integrations/chat/anthropic_functions.ipynb index 5f6d116e10b..6b2a031f456 100644 --- a/docs/docs/integrations/chat/anthropic_functions.ipynb +++ b/docs/docs/integrations/chat/anthropic_functions.ipynb @@ -15,16 +15,7 @@ "execution_count": 1, "id": "378be79b", "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/harrisonchase/.pyenv/versions/3.9.1/envs/langchain/lib/python3.9/site-packages/deeplake/util/check_latest_version.py:32: UserWarning: A newer version of deeplake (3.6.14) is available. It's recommended that you update to the latest version using `pip install -U deeplake`.\n", - " warnings.warn(\n" - ] - } - ], + "outputs": [], "source": [ "from langchain_experimental.llms.anthropic_functions import AnthropicFunctions" ] @@ -41,7 +32,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "e1d535f6", "metadata": {}, "outputs": [], @@ -102,7 +93,7 @@ "metadata": {}, "outputs": [], "source": [ - "response = model.predict_messages(\n", + "response = model.invoke(\n", " [HumanMessage(content=\"whats the weater in boston?\")], functions=functions\n", ")" ] @@ -140,7 +131,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 4, "id": "7af5c567", "metadata": {}, "outputs": [], @@ -162,7 +153,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "bd01082a", "metadata": {}, "outputs": [], @@ -172,24 +163,12 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "b5a23e9f", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[{'name': 'Alex', 'height': '5', 'hair_color': 'blonde'},\n", - " {'name': 'Claudia', 'height': '6', 'hair_color': 'brunette'}]" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ - "chain.run(inp)" + "chain.invoke(inp)" ] }, { @@ -256,7 +235,7 @@ } ], "source": [ - "chain.run(\"this is really cool\")" + "chain.invoke(\"this is really cool\")" ] } ], @@ -276,7 +255,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.1" + "version": "3.9.0" } }, "nbformat": 4,