danielkorat commited on
Commit
de7a7ed
·
verified ·
1 Parent(s): 47e0c42

Update my_tools.py

Browse files
Files changed (1) hide show
  1. my_tools.py +2 -2
my_tools.py CHANGED
@@ -36,8 +36,8 @@ def knowledge_and_intelligence_tool(query: str)-> str:
36
 
37
  data = response.json()
38
 
39
- if data.get("error"): # Check if there's an error in the response
40
- return f"Error: {data['error'].get('info', 'Unable to fetch Wolfram response.')}"
41
 
42
  response = ""
43
  for result in data.get("queryresult").get("pods")[0].get("subpods"):
 
36
 
37
  data = response.json()
38
 
39
+ if data.get("queryresult").get("error"): # Check if there's an error in the response
40
+ return f"Error: {data["queryresult"]['error'].get('msg', 'Unable to fetch Wolfram response.')}"
41
 
42
  response = ""
43
  for result in data.get("queryresult").get("pods")[0].get("subpods"):