Spaces:
Running
Running
Fix: continue fetching response after error
Browse files- server/backend.py +2 -1
server/backend.py
CHANGED
@@ -69,10 +69,11 @@ class Backend_Api:
|
|
69 |
print(f"Error with proxy {random_proxy}: {e}")
|
70 |
remove_proxy(random_proxy)
|
71 |
|
72 |
-
|
73 |
try:
|
74 |
res = gpt3.Completion.create(prompt=conversation)
|
75 |
response = res['text']
|
|
|
76 |
except Exception as e:
|
77 |
print(f"Error: {e}")
|
78 |
|
|
|
69 |
print(f"Error with proxy {random_proxy}: {e}")
|
70 |
remove_proxy(random_proxy)
|
71 |
|
72 |
+
while not self.use_auto_proxy:
|
73 |
try:
|
74 |
res = gpt3.Completion.create(prompt=conversation)
|
75 |
response = res['text']
|
76 |
+
break
|
77 |
except Exception as e:
|
78 |
print(f"Error: {e}")
|
79 |
|