Spaces:
Sleeping
Sleeping
Junhui Ji
commited on
Commit
·
4d812cb
1
Parent(s):
99d5d45
delete client ip
Browse files
main.py
CHANGED
@@ -206,7 +206,7 @@ async def analyze_feedback(request: AnalysisRequest):
|
|
206 |
async def optimize_design(request: OptimizationRequest, client_ip: str = None):
|
207 |
try:
|
208 |
# 查看客户是否提供了openai_key,获取客户端IP(如果未提供,使用默认值)
|
209 |
-
if not request.openai_key
|
210 |
print(f'user_ip {client_ip} not in whitelist')
|
211 |
raise HTTPException(
|
212 |
status_code=503,
|
|
|
206 |
async def optimize_design(request: OptimizationRequest, client_ip: str = None):
|
207 |
try:
|
208 |
# 查看客户是否提供了openai_key,获取客户端IP(如果未提供,使用默认值)
|
209 |
+
if not request.openai_key and client_ip not in white_list:
|
210 |
print(f'user_ip {client_ip} not in whitelist')
|
211 |
raise HTTPException(
|
212 |
status_code=503,
|