import os# 获取ChatGPT AI for MAX的API密钥和API密钥密码api_key = input("请输入您的API密钥:")
api_secret_key = input("请输入您的API密钥密码:")# 配置文件路径config_path = "config.json"# 创建配置文件if not os.path.exists(config_path): with open(config_path, "w") as f:
f.write(f"{{ \"api_key\": \"{api_key}\", \"api_secret_key\": \"{api_secret_key}\" }}")else: with open(config_path, "r") as f:
config = json.load(f)
config["api_key"] = api_key
config["api_secret_key"] = api_secret_key with open(config_path, "w") as f:
json.dump(config, f)# 启动ChatGPT AI for MAX服务os.system("start ChatGPT AI for MAX.exe")