utilized openai api for implementation of chatGPT with LineBot
go version go1.18.1 darwin/amd64
git clone https://github.com/TaroballzChen/LineBotChatGPT
cd LineBotChatGPT
echo ChannelSecret=your_LINE_ChannelSecret >> .env
echo ChannelAccessToken=your_LINE_ChannelAccessToken >> .env
echo OpenApiKey=your_OpenApiKey >>.env
echo DeepSeekAzureApiKey=your_DeepSeekAzureApiKey >>.env
echo DeepSeekAzureApiUrl=your_DeepSeekAzureApiUrl >>.env
# you could modify the GPT-3 completion model parameter by modifying `.env` file
go run main.gothen use ngrok or other method(cloud container, nginx with certbot etc.) exposed 80 port to public network with SSL
enjoy!
- download the
Dockerfile,.envfile in this project docker build --no-cache -t LineBotChatGPT:latest .- modify the
.envfile to fill the LINEBOT and OpenAI token:
echo ChannelSecret=your_LINE_ChannelSecret >> .env
echo ChannelAccessToken=your_LINE_ChannelAccessToken >> .env
echo OpenApiKey=your_OpenApiKey >>.env
echo DeepSeekAzureApiKey=your_DeepSeekAzureApiKey >>.env
echo DeepSeekAzureApiUrl=your_DeepSeekAzureApiUrl >>.env
# try to modify the GPT-3 completion model parameter by modifying `.env` filedocker run -p 8080:80 -v $PWD/.env:/LineBotChatGPT/.env LineBotChatGPTthen usengrokor other method(cloud container like railway.app, Heroku or nginx with certbot etc.) exposed80port to public network with SSL
enjoy!
- fill
PORT80for required environment variable - fill your LINE
ChannelSecret,ChannelAccessTokenand OpenAIOpenAIApiKeytoken, Claude2Claude2ApiKeytoken for required environment variable
P.S. You should own the github account to sign up the railway.app account. When you create container by my template on the above, the railway.app would help you fork my github project to your repo. then you could modify the model parameter's value on your forked project.
enjoy!
integration of chatgpt and LINEBOT on railway.app cloud container tutorial video
- 2023.3.6 change the model from
CompletiontoChatCompletionwithGPT3Dot5Turbo - 2023.10.1 change the model from
ChatCompletionwithGPT3Dot5TurbotoChatCompletionwithGPT4and add Image create function - 2023.10.23 add Claude2 model
- 2023.10.28 add memory function for Claude2 model
- 2023.12.18 add Gemini model and with memory
- 2024.06.26 change the model from
ChatCompletionwithGPT4TurboPreivewtoChatCompletionwithGPT4o - 2025.03.06 add DeepSeek-R1 model from Azure
- https://github.com/kkdai/linebot-group
- https://github.com/kkdai/LineBotTemplate
- https://www.learncodewithmike.com/2020/06/python-line-bot.html
- https://github.com/kkdai/chatgpt
- https://github.com/PullRequestInc/go-gpt3
- https://github.com/bincooo/claude-api
- https://github.com/google/generative-ai-go?tab=readme-ov-file
