shideqin commited on
Commit
0496418
1 Parent(s): 98d8e6c

Update chat_func.py

Browse files
Files changed (1) hide show
  1. chat_func.py +3 -1
chat_func.py CHANGED
@@ -29,7 +29,9 @@ if TYPE_CHECKING:
29
 
30
 
31
  initial_prompt = "You are a helpful assistant."
32
- API_URL = "https://api.openai.com/v1/chat/completions"
 
 
33
  HISTORY_DIR = "history"
34
  TEMPLATES_DIR = "templates"
35
 
 
29
 
30
 
31
  initial_prompt = "You are a helpful assistant."
32
+
33
+ OPENAI_API = os.getenv("OPENAI_API","api.openai.com")
34
+ API_URL = "https://"+OPENAI_API+"/v1/chat/completions"
35
  HISTORY_DIR = "history"
36
  TEMPLATES_DIR = "templates"
37