Skip to content

Commit c572d66

Browse files
authored
docs: Ontotext GraphDB QA Chain Update Documentation (Fix versions of libraries) (#27783)
- **Description:** Update versions of libraries in the Ontotext GraphDB QA Chain Documentation - **Issue:** N/A - **Dependencies:** N/A - **Twitter handle:** @OntotextGraphDB
1 parent 8ef0df3 commit c572d66

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

docs/docs/integrations/graphs/ontotext.ipynb

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,20 @@
8484
" You need to wait a couple of seconds for the database to start on `http://localhost:7200/`. The Star Wars dataset `starwars-data.trig` is automatically loaded into the `langchain` repository. The local SPARQL endpoint `http://localhost:7200/repositories/langchain` can be used to run queries against. You can also open the GraphDB Workbench from your favourite web browser `http://localhost:7200/sparql` where you can make queries interactively.\n",
8585
"* Set up working environment\n",
8686
"\n",
87-
"If you use `conda`, create and activate a new conda env (e.g. `conda create -n graph_ontotext_graphdb_qa python=3.9.18`).\n",
87+
"If you use `conda`, create and activate a new conda environment, e.g.:\n",
88+
"\n",
89+
"```\n",
90+
"conda create -n graph_ontotext_graphdb_qa python=3.12\n",
91+
"conda activate graph_ontotext_graphdb_qa\n",
92+
"```\n",
8893
"\n",
8994
"Install the following libraries:\n",
9095
"\n",
9196
"```\n",
92-
"pip install jupyter==1.0.0\n",
93-
"pip install openai==1.6.1\n",
94-
"pip install rdflib==7.0.0\n",
95-
"pip install langchain-openai==0.0.2\n",
96-
"pip install langchain>=0.1.5\n",
97+
"pip install jupyter==1.1.1\n",
98+
"pip install rdflib==7.1.1\n",
99+
"pip install langchain-community==0.3.4\n",
100+
"pip install langchain-openai==0.2.4\n",
97101
"```\n",
98102
"\n",
99103
"Run Jupyter with\n",
@@ -255,6 +259,7 @@
255259
" ChatOpenAI(temperature=0, model_name=\"gpt-4-1106-preview\"),\n",
256260
" graph=graph,\n",
257261
" verbose=True,\n",
262+
" allow_dangerous_requests=True,\n",
258263
")"
259264
]
260265
},
@@ -332,6 +337,7 @@
332337
"\u001b[32;1m\u001b[1;3mPREFIX : <https://swapi.co/vocabulary/>\n",
333338
"PREFIX owl: <http://www.w3.org/2002/07/owl#>\n",
334339
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n",
340+
"PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n",
335341
"\n",
336342
"SELECT ?climate\n",
337343
"WHERE {\n",
@@ -383,11 +389,9 @@
383389
"\u001b[1m> Entering new OntotextGraphDBQAChain chain...\u001b[0m\n",
384390
"Generated SPARQL:\n",
385391
"\u001b[32;1m\u001b[1;3mPREFIX : <https://swapi.co/vocabulary/>\n",
386-
"PREFIX owl: <http://www.w3.org/2002/07/owl#>\n",
387-
"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n",
388392
"PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n",
389393
"\n",
390-
"SELECT (AVG(?boxOffice) AS ?averageBoxOffice)\n",
394+
"SELECT (AVG(?boxOffice) AS ?averageBoxOfficeRevenue)\n",
391395
"WHERE {\n",
392396
" ?film a :Film .\n",
393397
" ?film :boxOffice ?boxOfficeValue .\n",
@@ -559,7 +563,7 @@
559563
"name": "python",
560564
"nbconvert_exporter": "python",
561565
"pygments_lexer": "ipython3",
562-
"version": "3.10.12"
566+
"version": "3.12.7"
563567
}
564568
},
565569
"nbformat": 4,

0 commit comments

Comments
 (0)