瀏覽代碼

fix: json parse error in docker #600 #601

master
zhayujie 1 年之前
父節點
當前提交
e226c93eeb
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. +1
    -1
      config.py
  2. +1
    -1
      docker/entrypoint.sh

+ 1
- 1
config.py 查看文件

@@ -98,7 +98,7 @@ def load_config():
config_path = "./config-template.json"

config_str = read_file(config_path)
logger.info("[INIT] config str: {}".format(config_str))
logger.debug("[INIT] config str: {}".format(config_str))

# 将json字符串反序列化为dict类型
config = Config(json.loads(config_str))


+ 1
- 1
docker/entrypoint.sh 查看文件

@@ -84,7 +84,7 @@ if [ "$CHARACTER_DESC" != "" ] ; then
fi

if [ "$EXPIRES_IN_SECONDS" != "" ] ; then
sed -i "s/\"expires_in_seconds\".*$/\"expires_in_seconds\": $EXPIRES_IN_SECONDS/" $CHATGPT_ON_WECHAT_CONFIG_PATH
sed -i "s/\"expires_in_seconds\".*$/\"expires_in_seconds\": $EXPIRES_IN_SECONDS,/" $CHATGPT_ON_WECHAT_CONFIG_PATH
fi

# go to prefix dir


Loading…
取消
儲存