mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-29 09:58:44 +00:00
parent
20b72a044c
commit
837a3d400b
@ -316,7 +316,7 @@
|
|||||||
"id": "eb00a625-a6c9-4766-b3f0-eaed024851c9",
|
"id": "eb00a625-a6c9-4766-b3f0-eaed024851c9",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"## Return SQARQL query\n",
|
"## Return SPARQL query\n",
|
||||||
"You can return the SPARQL query step from the Sparql QA Chain using the `return_sparql_query` parameter"
|
"You can return the SPARQL query step from the Sparql QA Chain using the `return_sparql_query` parameter"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -358,7 +358,7 @@
|
|||||||
"\u001b[32;1m\u001b[1;3m[]\u001b[0m\n",
|
"\u001b[32;1m\u001b[1;3m[]\u001b[0m\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\u001b[1m> Finished chain.\u001b[0m\n",
|
"\u001b[1m> Finished chain.\u001b[0m\n",
|
||||||
"SQARQL query: PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n",
|
"SPARQL query: PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n",
|
||||||
"SELECT ?workHomepage\n",
|
"SELECT ?workHomepage\n",
|
||||||
"WHERE {\n",
|
"WHERE {\n",
|
||||||
" ?person foaf:name \"Tim Berners-Lee\" .\n",
|
" ?person foaf:name \"Tim Berners-Lee\" .\n",
|
||||||
@ -370,7 +370,7 @@
|
|||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"result = chain(\"What is Tim Berners-Lee's work homepage?\")\n",
|
"result = chain(\"What is Tim Berners-Lee's work homepage?\")\n",
|
||||||
"print(f\"SQARQL query: {result['sparql_query']}\")\n",
|
"print(f\"SPARQL query: {result['sparql_query']}\")\n",
|
||||||
"print(f\"Final answer: {result['result']}\")"
|
"print(f\"Final answer: {result['result']}\")"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user