Skip to content

Commit

Permalink
Update prompt details
Browse files Browse the repository at this point in the history
  • Loading branch information
TheExplainthis committed Mar 20, 2023
1 parent da3afdb commit 4f04c88
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
11 changes: 4 additions & 7 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,16 @@ Import the ChatGPT bot to Line and start interacting with it by simply typing te
1. Environment variables setting:
1. After completing the previous step of `Import`, click on `Tools` at the bottom left of the project management page in `Replit`, then click on `Secrets`.
2. Click on `Got it` on the right side to add environment variables, which includes:
1. OpenAI API Token:
- key: `OPENAI_API`
- value: `[obtained from step one]`
2. Desired model:
1. Desired model:
- key: `OPENAI_MODEL_ENGINE`
- value: `gpt-3.5-turbo`
3. ChatGPT wants the assistant to play the role of a keyword (currently, no further usage instructions have been officially released, and players can test it themselves).
2. ChatGPT wants the assistant to play the role of a keyword (currently, no further usage instructions have been officially released, and players can test it themselves).
- key: `SYSTEM_MESSAGE`
- value: `You are a helpful assistant.`
4. Line Channel Secret:
3. Line Channel Secret:
- key: `LINE_CHANNEL_SECRET`
- value: `[obtained from step one]`
5. Line Channel Access Token:
4. Line Channel Access Token:
- key: `LINE_CHANNEL_ACCESS_TOKEN`
- value: `[obtained from step one]`
2. Start running:
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,16 @@
1. 環境變數設定
1. 接續上一步 `Import` 完成後在 `Replit` 的專案管理頁面左下方 `Tools` 點擊 `Secrets`
2. 右方按下 `Got it` 後,即可新增環境變數,需新增:
1. OpenAI API Token:
- key: `OPENAI_API`
- value: `[由上方步驟一取得]`
2. 欲選擇的模型:
1. 欲選擇的模型:
- key: `OPENAI_MODEL_ENGINE`
- value: `gpt-3.5-turbo`
3. ChatGPT 要讓助理扮演的角色詞(目前官方無釋出更多的使用方法,由玩家自行測試)
2. ChatGPT 要讓助理扮演的角色詞(目前官方無釋出更多的使用方法,由玩家自行測試)
- key: `SYSTEM_MESSAGE`
- value: `You are a helpful assistant.`
4. Line Channel Secret:
3. Line Channel Secret:
- key: `LINE_CHANNEL_SECRET`
- value: `[由步驟一取得]`
5. Line Channel Access Token:
4. Line Channel Access Token:
- key: `LINE_CHANNEL_ACCESS_TOKEN`
- value: `[由步驟一取得]`
2. 開始執行
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def handle_text_message(event):
else:
msg = TextSendMessage(text='Token 無效,請重新註冊,注意格式有空格,格式為 /註冊 sk-xxxxx')
elif text.startswith('/指令說明'):
msg = TextSendMessage(text="指令: \n/註冊 + API Token \n∙ /系統訊息 + Prompt \n/清除 \n/圖像 + Prompt \n∙ 語音輸入 \n∙ 其他文字輸入 \n")
msg = TextSendMessage(text="指令:\n/註冊 + API Token\n👉 API Token 請先到 https://platform.openai.com/ 註冊登入後取得\n\n/系統訊息 + Prompt\n👉 Prompt 可以命令機器人扮演某個角色,例如:請你扮演擅長做總結的人\n\n/清除\n👉 當前每一次都會紀錄最後兩筆歷史紀錄,這個指令能夠清除歷史訊息\n\n/圖像 + Prompt\n👉 會調用 DALL∙E 2 Model,以文字生成圖像\n\n語音輸入\n👉 會調用 Whisper 模型,先將語音轉換成文字,再調用 ChatGPT 以文字回覆\n\n其他文字輸入\n👉 調用 ChatGPT 以文字回覆")
elif text.startswith('/系統訊息'):
system_message = text[5:]
memory.change_system_message(user_id, system_message)
Expand Down

0 comments on commit 4f04c88

Please sign in to comment.