Spaces:
Runtime error
Runtime error
Update chat_func.py
Browse files- chat_func.py +1 -0
chat_func.py
CHANGED
@@ -264,6 +264,7 @@ def predict(
|
|
264 |
files = None,
|
265 |
should_check_token_count=True,
|
266 |
): # repetition_penalty, top_k
|
|
|
267 |
logging.info("输入为:" + colorama.Fore.BLUE + f"{inputs}" + colorama.Style.RESET_ALL)
|
268 |
if files:
|
269 |
msg = "构建索引中……(这可能需要比较久的时间)"
|
|
|
264 |
files = None,
|
265 |
should_check_token_count=True,
|
266 |
): # repetition_penalty, top_k
|
267 |
+
openai_api_key = openai_api_key or os.environ.get("OPENAI_API_KEY", "")
|
268 |
logging.info("输入为:" + colorama.Fore.BLUE + f"{inputs}" + colorama.Style.RESET_ALL)
|
269 |
if files:
|
270 |
msg = "构建索引中……(这可能需要比较久的时间)"
|