This commit is contained in:
beabigegg
2025-09-02 13:11:48 +08:00
parent a60d965317
commit b11a8272c4
76 changed files with 15321 additions and 200 deletions

33
check_config.py Normal file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
檢查配置
"""
import sys
import os
# 添加 app 路徑
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
def main():
from app import create_app
app = create_app()
with app.app_context():
print("配置檢查:")
print(f"DIFY_API_BASE_URL: '{app.config.get('DIFY_API_BASE_URL', 'NOT_SET')}'")
print(f"DIFY_API_KEY: '{app.config.get('DIFY_API_KEY', 'NOT_SET')}'")
# 檢查 api.txt 文件
import os
if os.path.exists('api.txt'):
with open('api.txt', 'r', encoding='utf-8') as f:
content = f.read()
print(f"\napi.txt 內容:")
print(content)
else:
print("\napi.txt 文件不存在")
if __name__ == "__main__":
main()