From 5d7076a66d6c69f6f56ab894c4ea4b721f66e2f3 Mon Sep 17 00:00:00 2001 From: Parker Erickson Date: Tue, 17 Dec 2024 08:54:52 -0600 Subject: [PATCH] fix --- docs/notebooks/SupportAIDemo.ipynb | 58 +++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/docs/notebooks/SupportAIDemo.ipynb b/docs/notebooks/SupportAIDemo.ipynb index 4b21a0c5..1b1e477b 100644 --- a/docs/notebooks/SupportAIDemo.ipynb +++ b/docs/notebooks/SupportAIDemo.ipynb @@ -11,7 +11,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 50, "metadata": {}, "outputs": [], "source": [ @@ -75,7 +75,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 51, "metadata": {}, "outputs": [], "source": [ @@ -107,12 +107,12 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "access = \"AKIARJ6KUJUIS7KJ27YO\"\n", - "sec = \"swYmXU+4yZbXiYCMfwSFxrcS0hNiOd6nzYog6VCZ\"\n", + "access = \"\"\n", + "sec = \"\"\n", "res = conn.ai.createDocumentIngest(\n", " data_source=\"s3\",\n", " data_source_config={\"aws_access_key\": access, \"aws_secret_key\": sec},\n", @@ -145,7 +145,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 52, "metadata": {}, "outputs": [ { @@ -154,13 +154,55 @@ "{'status': 'submitted'}" ] }, - "execution_count": 15, + "execution_count": 52, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "conn.ai.forceConsistencyUpdate(\"graphrag\")" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": {}, + "outputs": [], + "source": [ + "from pyTigerGraph import AsyncTigerGraphConnection\n", + "\n", + "conn = AsyncTigerGraphConnection(\n", + " host=host,\n", + " username=username,\n", + " password=password,\n", + " gsPort=\"31409\"\n", + ")\n", + "\n", + "conn.graphname = \"pyTigerGraphRAG\"\n", + "\n", + "res = await conn.gsql(\"\"\"USE GRAPH pyTigerGraphRAG\n", + " CREATE QUERY hello() FOR GRAPH pyTigerGraphRAG{PRINT \"hello\";}\n", + " INSTALL QUERY hello\"\"\")" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "\"Using graph 'pyTigerGraphRAG'\\nline 2:53 extraneous input ''' expecting {ABORT, ALL, AND, ANY, AVG, BY, CASE, COALESCE, COLLECT, COLUMN, COMMIT, COUNT, DATETIME_ADD, DATETIME_SUB, DEFAULT, DIRECTED, DISTINCT, FALSE, FILE, GROUP, INSERT, ISEMPTY, JOIN, LASTHOP, LEFT, LIST, LOG, MAP, MATCH, MAX, MIN, NOT, NOW, NULL, ON, OR, OUTER, PATH, PER, PROJECT, RANGE, REPLACE, STDEV, STDEVP, SELECT_VERTEX, SEMIJOIN, SET, SRC, SUM, TGT, TO_DATETIME, TRIM, TRUE, UNDIRECTED, UPDATE, VIRTUAL, FILTERTYPE, GSQL_INT_MAX, GSQL_INT_MIN, GSQL_UINT_MAX, '__ENGINE__E_ATTR', '__ENGINE__SRC_ATTR', '__ENGINE__TGT_ATTR', '__ENGINE__V_ATTR', '__ENGINE__SRC_VAL', '__ENGINE__TGT_VAL', '__ENGINE__V_VAL', '__ENGINE__MESSAGE', '__ENGINE__CONTEXT', '__ENGINE__REQUEST', '__ENGINE__SERVICEAPI', 'type', '(', '[', '-', '.', '_', CONST_INT, CONST_STR, NAME, GACCNAME}\\nline 2:59 extraneous input ''' expecting {TO_CSV, WHERE, WITH_EMBEDDING, ',', ';'}\\nParsing encountered 2 syntax error(s)\\n\\nSaved as draft query with type/semantic error: [hello].\\nThe status of query hello is DRAFT, skip.\\nSemantic Check Fails: Graph pyTigerGraphRAG: all queries in this catalog have been installed already.\\nQuery installation finished.\"" + ] + }, + "execution_count": 40, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "conn.ai.forceConsistencyUpdate()" + "res" ] }, {