WeByT3 commited on
Commit
00658dc
·
verified ·
1 Parent(s): 5028971

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +9 -9
tools.py CHANGED
@@ -135,15 +135,15 @@ def wiki_search(query: str) -> str:
135
 
136
  Args:
137
  query: The search query for SPARQL."""
138
- try:
139
- endpoint = SPARQLWrapper("https://query.wikidata.org/sparql")
140
- endpoint.setQuery(query)
141
- endpoint.setReturnFormat(JSON)
142
-
143
- results = endpoint.query().convert()
144
- return json.dumps(results, indent=2)
145
- except Exception as e:
146
- return f"Error executing SPARQL query: {str(e)}"
147
 
148
  @tool
149
  def transcribe_audio(file_path: str) -> str:
 
135
 
136
  Args:
137
  query: The search query for SPARQL."""
138
+ try:
139
+ endpoint = SPARQLWrapper("https://query.wikidata.org/sparql")
140
+ endpoint.setQuery(query)
141
+ endpoint.setReturnFormat(JSON)
142
+
143
+ results = endpoint.query().convert()
144
+ return json.dumps(results, indent=2)
145
+ except Exception as e:
146
+ return f"Error executing SPARQL query: {str(e)}"
147
 
148
  @tool
149
  def transcribe_audio(file_path: str) -> str: