Spaces:
Paused
Paused
Upload 4 files
Browse files
app.py
CHANGED
|
@@ -176,7 +176,7 @@ GEMINI_MODELS = [
|
|
| 176 |
|
| 177 |
@app.route('/')
|
| 178 |
def index():
|
| 179 |
-
main_content = "Moonfanz Reminiproxy v2.3.
|
| 180 |
html_template = """
|
| 181 |
<!DOCTYPE html>
|
| 182 |
<html>
|
|
@@ -485,7 +485,7 @@ def chat_completions():
|
|
| 485 |
else:
|
| 486 |
try:
|
| 487 |
text_content = response.text
|
| 488 |
-
logger.info(
|
| 489 |
except (AttributeError, IndexError, TypeError, ValueError) as e:
|
| 490 |
if "response.candidates" in str(e) or "response.text" in str(e):
|
| 491 |
logger.error(f"用户输入被AI安全过滤器阻止")
|
|
@@ -544,7 +544,7 @@ if __name__ == '__main__':
|
|
| 544 |
|
| 545 |
scheduler.add_job(keep_alive, 'interval', hours=12)
|
| 546 |
scheduler.start()
|
| 547 |
-
logger.info(f"Reminiproxy v2.3.
|
| 548 |
logger.info(f"最大尝试次数/MaxRetries: {MAX_RETRIES}")
|
| 549 |
logger.info(f"最大请求次数/MaxRequests: {MAX_REQUESTS}")
|
| 550 |
logger.info(f"请求限额窗口/LimitWindow: {LIMIT_WINDOW} 秒")
|
|
|
|
| 176 |
|
| 177 |
@app.route('/')
|
| 178 |
def index():
|
| 179 |
+
main_content = "Moonfanz Reminiproxy v2.3.1 2025-01-12"
|
| 180 |
html_template = """
|
| 181 |
<!DOCTYPE html>
|
| 182 |
<html>
|
|
|
|
| 485 |
else:
|
| 486 |
try:
|
| 487 |
text_content = response.text
|
| 488 |
+
logger.info(f"AI响应: {text_content}")
|
| 489 |
except (AttributeError, IndexError, TypeError, ValueError) as e:
|
| 490 |
if "response.candidates" in str(e) or "response.text" in str(e):
|
| 491 |
logger.error(f"用户输入被AI安全过滤器阻止")
|
|
|
|
| 544 |
|
| 545 |
scheduler.add_job(keep_alive, 'interval', hours=12)
|
| 546 |
scheduler.start()
|
| 547 |
+
logger.info(f"Reminiproxy v2.3.1 启动")
|
| 548 |
logger.info(f"最大尝试次数/MaxRetries: {MAX_RETRIES}")
|
| 549 |
logger.info(f"最大请求次数/MaxRequests: {MAX_REQUESTS}")
|
| 550 |
logger.info(f"请求限额窗口/LimitWindow: {LIMIT_WINDOW} 秒")
|