From 8ca641cda6f4afd194a908c9f9aefd0fadc26eed Mon Sep 17 00:00:00 2001 From: Ankush Gola Date: Wed, 12 Jun 2024 13:39:59 -0700 Subject: [PATCH] nits --- examples/tutorials/sql-agent.ipynb | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/examples/tutorials/sql-agent.ipynb b/examples/tutorials/sql-agent.ipynb index 0b33f6557..c59c61c07 100644 --- a/examples/tutorials/sql-agent.ipynb +++ b/examples/tutorials/sql-agent.ipynb @@ -308,7 +308,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 20, "outputs": [ { "name": "stdout", @@ -316,14 +316,6 @@ "text": [ "[(1, 'AC/DC'), (2, 'Accept'), (3, 'Aerosmith'), (4, 'Alanis Morissette'), (5, 'Alice In Chains'), (6, 'Antônio Carlos Jobim'), (7, 'Apocalyptica'), (8, 'Audioslave'), (9, 'BackBeat'), (10, 'Billy Cobham')]\n" ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/ankushgola/Code/langgraph/.venv/lib/python3.11/site-packages/langchain_core/_api/deprecation.py:119: LangChainDeprecationWarning: The method `BaseTool.__call__` was deprecated in langchain-core 0.1.47 and will be removed in 0.3.0. Use invoke instead.\n", - " warn_deprecated(\n" - ] } ], "source": [ @@ -341,13 +333,13 @@ " return \"Error: Query failed. Please rewrite your query and try again.\"\n", " return result\n", "\n", - "print(db_query_tool(\"SELECT * FROM Artist LIMIT 10;\"))" + "print(db_query_tool.invoke(\"SELECT * FROM Artist LIMIT 10;\"))" ], "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-06-12T20:18:17.745278Z", - "start_time": "2024-06-12T20:18:17.338936Z" + "end_time": "2024-06-12T20:39:35.759834Z", + "start_time": "2024-06-12T20:39:35.740255Z" } }, "id": "f7eb708ecb4c7cfc" @@ -617,6 +609,16 @@ }, "id": "4f200d1813897000" }, + { + "cell_type": "markdown", + "source": [ + "## Run the agent" + ], + "metadata": { + "collapsed": false + }, + "id": "bdf78dc68548522c" + }, { "cell_type": "code", "execution_count": 18,