#!/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()