@@ -5,8 +5,7 @@ ARG TZ='Asia/Shanghai' | |||||
ARG CHATGPT_ON_WECHAT_VER | ARG CHATGPT_ON_WECHAT_VER | ||||
ENV BUILD_PREFIX=/app \ | |||||
BUILD_OPEN_AI_API_KEY='YOUR OPEN AI KEY HERE' | |||||
ENV BUILD_PREFIX=/app | |||||
RUN apk add --no-cache \ | RUN apk add --no-cache \ | ||||
bash \ | bash \ | ||||
@@ -22,7 +21,6 @@ RUN apk add --no-cache \ | |||||
&& rm chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \ | && rm chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \ | ||||
&& cd ${BUILD_PREFIX} \ | && cd ${BUILD_PREFIX} \ | ||||
&& cp config-template.json ${BUILD_PREFIX}/config.json \ | && cp config-template.json ${BUILD_PREFIX}/config.json \ | ||||
&& sed -i "2s/YOUR API KEY/${BUILD_OPEN_AI_API_KEY}/" ${BUILD_PREFIX}/config.json \ | |||||
&& /usr/local/bin/python -m pip install --no-cache --upgrade pip \ | && /usr/local/bin/python -m pip install --no-cache --upgrade pip \ | ||||
&& pip install --no-cache \ | && pip install --no-cache \ | ||||
itchat-uos==1.5.0.dev0 \ | itchat-uos==1.5.0.dev0 \ | ||||
@@ -5,8 +5,7 @@ ARG TZ='Asia/Shanghai' | |||||
ARG CHATGPT_ON_WECHAT_VER | ARG CHATGPT_ON_WECHAT_VER | ||||
ENV BUILD_PREFIX=/app \ | |||||
BUILD_OPEN_AI_API_KEY='YOUR OPEN AI KEY HERE' | |||||
ENV BUILD_PREFIX=/app | |||||
RUN apt-get update \ | RUN apt-get update \ | ||||
&& apt-get install -y --no-install-recommends \ | && apt-get install -y --no-install-recommends \ | ||||
@@ -23,7 +22,6 @@ RUN apt-get update \ | |||||
&& rm chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \ | && rm chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \ | ||||
&& cd ${BUILD_PREFIX} \ | && cd ${BUILD_PREFIX} \ | ||||
&& cp config-template.json ${BUILD_PREFIX}/config.json \ | && cp config-template.json ${BUILD_PREFIX}/config.json \ | ||||
&& sed -i "2s/YOUR API KEY/${BUILD_OPEN_AI_API_KEY}/" ${BUILD_PREFIX}/config.json \ | |||||
&& /usr/local/bin/python -m pip install --no-cache --upgrade pip \ | && /usr/local/bin/python -m pip install --no-cache --upgrade pip \ | ||||
&& pip install --no-cache \ | && pip install --no-cache \ | ||||
itchat-uos==1.5.0.dev0 \ | itchat-uos==1.5.0.dev0 \ | ||||
@@ -5,8 +5,7 @@ ARG TZ='Asia/Shanghai' | |||||
ARG CHATGPT_ON_WECHAT_VER | ARG CHATGPT_ON_WECHAT_VER | ||||
ENV BUILD_PREFIX=/app \ | |||||
BUILD_OPEN_AI_API_KEY='YOUR OPEN AI KEY HERE' | |||||
ENV BUILD_PREFIX=/app | |||||
COPY chatgpt-on-wechat.tar.gz ./chatgpt-on-wechat.tar.gz | COPY chatgpt-on-wechat.tar.gz ./chatgpt-on-wechat.tar.gz | ||||
@@ -16,11 +15,10 @@ RUN apk add --no-cache \ | |||||
&& mv chatgpt-on-wechat ${BUILD_PREFIX} \ | && mv chatgpt-on-wechat ${BUILD_PREFIX} \ | ||||
&& cd ${BUILD_PREFIX} \ | && cd ${BUILD_PREFIX} \ | ||||
&& cp config-template.json ${BUILD_PREFIX}/config.json \ | && cp config-template.json ${BUILD_PREFIX}/config.json \ | ||||
&& sed -i "2s/YOUR API KEY/${BUILD_OPEN_AI_API_KEY}/" ${BUILD_PREFIX}/config.json \ | |||||
&& /usr/local/bin/python -m pip install --no-cache --upgrade pip \ | && /usr/local/bin/python -m pip install --no-cache --upgrade pip \ | ||||
&& pip install --no-cache \ | && pip install --no-cache \ | ||||
itchat-uos==1.5.0.dev0 \ | itchat-uos==1.5.0.dev0 \ | ||||
openai | |||||
openai | |||||
WORKDIR ${BUILD_PREFIX} | WORKDIR ${BUILD_PREFIX} | ||||
@@ -9,7 +9,7 @@ CHATGPT_ON_WECHAT_CONFIG_PATH=${CHATGPT_ON_WECHAT_CONFIG_PATH:-""} | |||||
CHATGPT_ON_WECHAT_EXEC=${CHATGPT_ON_WECHAT_EXEC:-""} | CHATGPT_ON_WECHAT_EXEC=${CHATGPT_ON_WECHAT_EXEC:-""} | ||||
# use environment variables to pass parameters | # use environment variables to pass parameters | ||||
# if you have not defined environment variables, set them bwlow | |||||
# if you have not defined environment variables, set them below | |||||
export OPEN_AI_API_KEY=${OPEN_AI_API_KEY:-'YOUR API KEY'} | export OPEN_AI_API_KEY=${OPEN_AI_API_KEY:-'YOUR API KEY'} | ||||
export OPEN_AI_PROXY=${OPEN_AI_PROXY:-""} | export OPEN_AI_PROXY=${OPEN_AI_PROXY:-""} | ||||
export SINGLE_CHAT_PREFIX=${SINGLE_CHAT_PREFIX:-'["bot", "@bot"]'} | export SINGLE_CHAT_PREFIX=${SINGLE_CHAT_PREFIX:-'["bot", "@bot"]'} | ||||