Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
@@ -302,8 +302,7 @@ def reset_textbox():
|
|
302 |
|
303 |
def reset_default():
|
304 |
global API_URL
|
305 |
-
|
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 和代理已重置"
|
|
|
302 |
|
303 |
def reset_default():
|
304 |
global API_URL
|
305 |
+
API_URL = os.getenv("OPENAI_API","https://api.openai.com/v1")+"/chat/completions"
|
|
|
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 和代理已重置"
|