Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
@@ -302,7 +302,8 @@ def reset_textbox():
|
|
302 |
|
303 |
def reset_default():
|
304 |
global API_URL
|
305 |
-
|
|
|
306 |
os.environ.pop("HTTPS_PROXY", None)
|
307 |
os.environ.pop("https_proxy", None)
|
308 |
return gr.update(value=API_URL), gr.update(value=""), "API URL 和代理已重置"
|
|
|
302 |
|
303 |
def reset_default():
|
304 |
global API_URL
|
305 |
+
OPENAI_API = os.getenv("OPENAI_API","api.openai.com")
|
306 |
+
API_URL = "https://"+OPENAI_API+"/v1/chat/completions"
|
307 |
os.environ.pop("HTTPS_PROXY", None)
|
308 |
os.environ.pop("https_proxy", None)
|
309 |
return gr.update(value=API_URL), gr.update(value=""), "API URL 和代理已重置"
|