diff --git a/docs/docs/integrations/graphs/ontotext.ipynb b/docs/docs/integrations/graphs/ontotext.ipynb
index 1d67d8c745ca9..7c28d7d2cca49 100644
--- a/docs/docs/integrations/graphs/ontotext.ipynb
+++ b/docs/docs/integrations/graphs/ontotext.ipynb
@@ -84,16 +84,20 @@
" 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",
"* Set up working environment\n",
"\n",
- "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",
+ "If you use `conda`, create and activate a new conda environment, e.g.:\n",
+ "\n",
+ "```\n",
+ "conda create -n graph_ontotext_graphdb_qa python=3.12\n",
+ "conda activate graph_ontotext_graphdb_qa\n",
+ "```\n",
"\n",
"Install the following libraries:\n",
"\n",
"```\n",
- "pip install jupyter==1.0.0\n",
- "pip install openai==1.6.1\n",
- "pip install rdflib==7.0.0\n",
- "pip install langchain-openai==0.0.2\n",
- "pip install langchain>=0.1.5\n",
+ "pip install jupyter==1.1.1\n",
+ "pip install rdflib==7.1.1\n",
+ "pip install langchain-community==0.3.4\n",
+ "pip install langchain-openai==0.2.4\n",
"```\n",
"\n",
"Run Jupyter with\n",
@@ -255,6 +259,7 @@
" ChatOpenAI(temperature=0, model_name=\"gpt-4-1106-preview\"),\n",
" graph=graph,\n",
" verbose=True,\n",
+ " allow_dangerous_requests=True,\n",
")"
]
},
@@ -332,6 +337,7 @@
"\u001b[32;1m\u001b[1;3mPREFIX : \n",
"PREFIX owl: \n",
"PREFIX rdfs: \n",
+ "PREFIX xsd: \n",
"\n",
"SELECT ?climate\n",
"WHERE {\n",
@@ -383,11 +389,9 @@
"\u001b[1m> Entering new OntotextGraphDBQAChain chain...\u001b[0m\n",
"Generated SPARQL:\n",
"\u001b[32;1m\u001b[1;3mPREFIX : \n",
- "PREFIX owl: \n",
- "PREFIX rdf: \n",
"PREFIX xsd: \n",
"\n",
- "SELECT (AVG(?boxOffice) AS ?averageBoxOffice)\n",
+ "SELECT (AVG(?boxOffice) AS ?averageBoxOfficeRevenue)\n",
"WHERE {\n",
" ?film a :Film .\n",
" ?film :boxOffice ?boxOfficeValue .\n",
@@ -559,7 +563,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.12"
+ "version": "3.12.7"
}
},
"nbformat": 4,