mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-31 08:32:32 +00:00
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
This commit is contained in:
parent
8ef0df3539
commit
c572d663f9
@ -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 : <https://swapi.co/vocabulary/>\n",
|
||||
"PREFIX owl: <http://www.w3.org/2002/07/owl#>\n",
|
||||
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n",
|
||||
"PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\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 : <https://swapi.co/vocabulary/>\n",
|
||||
"PREFIX owl: <http://www.w3.org/2002/07/owl#>\n",
|
||||
"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n",
|
||||
"PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\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,
|
||||
|
Loading…
Reference in New Issue
Block a user