Open contractorwolf opened 7 months ago
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):