About
GPT AI Assistant is a lightweight and extensible application that is implemented using the OpenAI API and LINE Messaging API.
Through the installation process, you can start to chat with your own AI assistant using the LINE mobile app.
Demo
Repository
https://github.com/memochou1993/gpt-ai-assistant
Installation
- Log in to theOpenAI website.
- Generate an OpenAIAPI key.
- Log in to theLINE website.
- Add a provider (e.g. "My Provider").
- Create a channel (e.g. "My AI Assistant") of type Messaging API.
- Click the "Messaging API" tab and generate achannel access token.
- Log in to theGitHub website.
- Go to the
gpt-ai-assistant
project. - Click the "Star" button to support this project and the developer.
- Click the "Fork" button to copy the source code to your own repository.
- Go to the
- Log in to theVercel website.
- Click the "Create a New Project" button to create a new project.
- Click the "Import" button to import the
gpt-ai-assistant
project. - Click the "Environment Variables" tab and add the following environment variables with their corresponding values:
OPENAI_API_KEY
with the OpenAIAPI key.LINE_CHANNEL_ACCESS_TOKEN
with the LINEchannel access token.LINE_CHANNEL_SECRET
with the LINEchannel secret.APP_LANG
withen
.- Click the "Deploy" button and wait for the deployment to complete.
- Go to the dashboard, copy the application URL, e.g. "https://gpt-ai-assistant.vercel.app/".
- Go back to theLINE website.
- Go to the page of "My AI Assistant", click the "Messaging API" tab, set the "Webhook URL" to application URL with "/webhook" path, e.g. "https://gpt-ai-assistant.vercel.app/webhook" and click the "Update" button.
- Click the "Verify" button to verify the webhook call is successful.
- Enable the "Use webhook" feature.
- Disable the "Auto-reply messages" feature.
- Disable the "Greeting messages" feature.
- Scan the QR code using the LINE mobile app to add as a friend.
- Start chatting with your own AI assistant!
Upgrade
On your owngpt-ai-assistant
project page, you can click on the "Sync fork" menu and then click on either the "Update branch" or "Discard commit" button to synchronize the latest code to your repository.
When the Vercel bot detects a change in the code, it will automatically redeploy.
Commands
Send commands using the LINE mobile app to perform specific functions.
General Commands
Name | Alias | Description |
---|---|---|
Talk | /talk | Talk with AI Assistant. |
Draw | /draw | Ask AI Assistant to draw a picture. |
Continue | /continue | Ask AI Assistant to continue the conversation. |
Activate | /activate | Activate auto-reply. TheVERCEL_ACCESS_TOKEN environment variable is required. |
Deactivate | /deactivate | Deactivate auto-reply. TheVERCEL_ACCESS_TOKEN environment variable is required. |
System Commands
Name | Alias | Description |
---|---|---|
Command | /command | Show the application commands. |
Version | /version | Show the application version. |
Documentation | /doc | Show the documentation. |
Report | /report | Report issues. |
Restart | /restart | Deploy the application. TheVERCEL_DEPLOY_HOOK_URL environment variable is required. |
Sum Commands
Name | Alias | Description |
---|---|---|
Sum | /sum | Ask AI Assistant to give a "summarize" response |
Advise | /advise | Ask AI Assistant to give a "advise" response |
Apologize | /apologize | Ask AI Assistant to give a "apologize" response |
Blame | /blame | Ask AI Assistant to give a "blame" response |
Comfort | /comfort | Ask AI Assistant to give a "comfort" response |
Complain | /complain | Ask AI Assistant to give a "complain" response |
Laugh | /laugh | Ask AI Assistant to give a "laugh" response |
Encourage | /encourage | Ask AI Assistant to give a "encourage" response |
Analyze Commands
Name | Alias | Description |
---|---|---|
Analyze | /analyze | Ask AI Assistant to analyze |
Analyze literarily | /analyze-literarily | Ask AI Assistant to analyze literarily |
Analyze mathematically | /analyze-mathematically | Ask AI Assistant to analyze mathematically |
Analyze numerologically | /analyze-numerologically | Ask AI Assistant to analyze numerologically |
Analyze philosophically | /analyze-philosophically | Ask AI Assistant to analyze philosophically |
Analyze psychologically | /analyze-psychologically | Ask AI Assistant to analyze psychologically |
Translate Commands
Name | Alias | Description |
---|---|---|
Translate to English | /translate-to-en | Ask AI Assistant to translate text to English |
Translate to Japanese | /translate-to-ja | Ask AI Assistant to translate text to Japanese |
Environment Variables
Set environment variables to change program settings.
Name | Default Value | Description |
---|---|---|
APP_DEBUG | false | Print prompt to console. The value must betrue offalse . |
APP_WEBHOOK_PATH | /webhook | Custom webhook URL path of application. |
APP_LANG | zh | Application language. The value must be one ofzh ,en orja . |
APP_MAX_GROUPS | 1 | Maximum groups. TheVERCEL_ACCESS_TOKEN environment variable is required. |
APP_MAX_USERS | 5 | Maximum users. TheVERCEL_ACCESS_TOKEN environment variable is required. |
BOT_NAME | AI | Name of AI Assistant. This is used to call AI Assistant when auto-reply is deactivated. |
VERCEL_PROJECT_NAME | gpt-ai-assistant | Custom Vercel project name. You can use this environment variable when the Vercel project name differs from the GitHub project name. |
VERCEL_ACCESS_TOKEN | null | Vercelaccess token |
VERCEL_DEPLOY_HOOK_URL | null | Verceldeploy hook URL |
OPENAI_API_KEY | null | OpenAIAPI key |
OPENAI_COMPLETION_MODEL | text-davinci-003 | Refer tomodel parameter for details. |
OPENAI_COMPLETION_TEMPERATURE | 0.9 | Refer totemperature parameter for details. |
OPENAI_COMPLETION_MAX_TOKENS | 160 | Refer tomax_tokens parameter for details. |
OPENAI_COMPLETION_FREQUENCY_PENALTY | 0 | Refer tofrequency_penalty parameter for details. |
OPENAI_COMPLETION_PRESENCE_PENALTY | 0.6 | Refer topresence_penalty parameter for details. |
OPENAI_IMAGE_GENERATION_SIZE | 256x256 | Refer tosize parameter for details. |
LINE_CHANNEL_ACCESS_TOKEN | null | LINEchannel access token |
LINE_CHANNEL_SECRET | null | LINEchannel secret |
Click the "Redeploy" button to redeploy if there are any changes.
Debug
- Check if the environment variables of the project are filled out correctly in the Vercel.
- Click the "Redeploy" button to redeploy if there are any changes.
- If there is still a problem, please go toIssues page, describe your problem and attach a screenshot.
Related Projects
Top comments(1)

Well done mate. I have deployed to customers in Taiwan. Looking forward to collaboration in the future.
For further actions, you may consider blocking this person and/orreporting abuse