You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have the latest version of the server and am running the build-it-yourself device but it seems to have a LOT of trouble trying to grab new data from the web. It can answer basic historical questions and stuff that i would expect chatGPT to have already built into the model. But when i try to get new data, by asking questions like: "what is the weather going to be like tomorrow in charlotte, nc? it seems to have issues. If i am looking at the console on the machine that is running the server it seems to hit this error over and over until it runs out of tokens:
JSONDecodeError Traceback (most recent call last)
Cell In[71], line 6
4 pass
5 print('##active_line3##')
----> 6 search_results = computer.browser.search('Ankylosaurus')
7 print('##active_line4##')
8 search_results
File ~/miniconda3/envs/01/lib/python3.10/site-packages/interpreter/core/computer/browser/browser.py:16, in Browser.search(self,
query)
9 """
10 Searches the web for the specified query and returns the results.
11 """
12 response = requests.get(
13 f'{self.computer.api_base.strip("/")}/browser/search',
14 params={"query": query},
15 )
---> 16 return response.json()["result"]
File ~/miniconda3/envs/01/lib/python3.10/site-packages/requests/models.py:975, in Response.json(self, **kwargs)
971 return complexjson.loads(self.text, **kwargs)
972 except JSONDecodeError as e:
973 # Catch JSON-related errors and raise as requests.JSONDecodeError
974 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
--> 975 raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
JSONDecodeError: Expecting value: line 2 column 1 (char 1)
It seems to try a bunch of ways to get the information but always has issues and eventually gives up and apologizes.
Expected behavior
I would expect it to be able to retrieve data from the web
Screenshots
Desktop (please complete the following information):
OS: Mac (M1 Mackbook Pro)
Python Version: 3.10
The text was updated successfully, but these errors were encountered:
I have the same problem: computer.api_base points to https://api.openinterpreter.com/v0/ that is broken. For the moment, I added an alternative search using Google in interpreter/core/computer/browser/browser.py
import requests
class Browser:
def __init__(self, computer):
self.computer = computer
def search(self, query):
"""
Searches the web for the specified query and returns the results.
"""
try:
response = requests.get(
f'{self.computer.api_base.strip("/")}/browser/search',
params={"query": query},
)
return response.json()["result"]
except:
try:
print("Error in OI API. Trying with Google search")
import googlesearch
import json
response = googlesearch.search(query, tld="com", num=1, stop=1, pause=1)
for r in response:
json_response = json.dumps({'result':r})
return json_response
except:
print("Error in Google search")
Describe the bug
I have the latest version of the server and am running the build-it-yourself device but it seems to have a LOT of trouble trying to grab new data from the web. It can answer basic historical questions and stuff that i would expect chatGPT to have already built into the model. But when i try to get new data, by asking questions like: "what is the weather going to be like tomorrow in charlotte, nc? it seems to have issues. If i am looking at the console on the machine that is running the server it seems to hit this error over and over until it runs out of tokens:
It seems to try a bunch of ways to get the information but always has issues and eventually gives up and apologizes.
Expected behavior
I would expect it to be able to retrieve data from the web
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: