1 Star 0 Fork 95

赵康 / QChatGPT

forked from RockChin / QChatGPT 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
generate_override_all.py 748 Bytes
一键复制 编辑 原始数据 按行查看 历史
RockChin 提交于 2023-03-18 20:43 . feat: 添加override-all.json
# 使用config-template生成override.json的字段全集模板文件override-all.json
# 关于override.json机制,请参考:https://github.com/RockChinQ/QChatGPT/pull/271
import json
import importlib
template = importlib.import_module("config-template")
output_json = {
"comment": "这是override.json支持的字段全集, 关于override.json机制, 请查看https://github.com/RockChinQ/QChatGPT/pull/271"
}
for k, v in template.__dict__.items():
if k.startswith("__"):
continue
# 如果是module
if type(v) == type(template):
continue
print(k, v, type(v))
output_json[k] = v
with open("override-all.json", "w", encoding="utf-8") as f:
json.dump(output_json, f, indent=4, ensure_ascii=False)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/yanyuxiyangzk/QChatGPT.git
git@gitee.com:yanyuxiyangzk/QChatGPT.git
yanyuxiyangzk
QChatGPT
QChatGPT
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891