ChatPDF-LineBot
  • 中文
  • English
GitHub
  • 中文
  • English
GitHub
  • Documentation

    • Introduction
    • Features and User Guide
    • Installation & Deployment
    • Environment Variables and Settings
      • Environment Variables List
      • Configuration Methods
        • Server or Docker Configuration
        • Local Configuration
    • Contact Information
    • Changelog

Environment Variables and Settings

Environment Variables List

* means required

VariableDescriptionDefault Value
MODEL_NAMEModel names used for Q&A, multiple models separated by |llama3-8b-8192|gpt-3.5-turbo|gpt-4-1106-preview
BASE_URLBase URLs for the corresponding models' API, multiple URLs separated by |https://api.groq.com/openai/v1|https://api.openai.com/v1|https://api.openai.com/v1
* API_KEYAPI keys for the corresponding models, multiple keys separated by |API_KEY_1|API_KEY_2|API_KEY_3
MAX_CHAT_HISTORYMaximum number of chat histories to retain5
EMBEDDING_MODELModel name used for text embedding (please provide the HF model path)sentence-transformers/all-MiniLM-L6-v2
EMBEDDING_DEVICEDevice to run the text embedding model (cpu or cuda, e.g., cuda:0, cuda:1)cpu
* LINE_CHANNEL_ACCESS_TOKENLine Bot access tokenYOUR_LINE_CHANNEL_ACCESS_TOKEN
* LINE_CHANNEL_SECRETLine Bot secretYOUR_LINE_CHANNEL_SECRET
* LINE_LIFF_IDLine LIFF page IDYOUR_LINE_LIFF_ID
* LINE_LOGIN_CHANNEL_IDLine Login Channel ID for the LIFF pageYOUR_LINE_LOGIN_CHANNEL_ID
FILE_MAX_SIZEMaximum upload file size allowed5MB
SPACE_PER_USERMaximum space available per user200MB
ALLOW_FILE_TYPEAllowed file types for upload, multiple types separated by ,pdf,csv,txt

Configuration Methods

Server or Docker Configuration

You can set environment variables directly on the server or Docker. Refer to the Installation Guide for details.

Local Configuration

  1. Copy the .env.example file and rename it to .env. Alternatively, create a .env file and paste the following content:
MODEL_NAME=llama3-8b-8192|gpt-3.5-turbo|gpt-4-1106-preview
BASE_URL=https://api.groq.com/openai/v1|https://api.openai.com/v1|https://api.openai.com/v1
API_KEY=API_KEY_1|API_KEY_2|API_KEY_3

MAX_CHAT_HISTORY=5
EMBEDDING_MODEL="sentence-transformers/all-MiniLM-L6-v2"
EMBEDDING_DEVICE="cpu"

LINE_CHANNEL_ACCESS_TOKEN=YOUR_LINE_CHANNEL_ACCESS_TOKEN
LINE_CHANNEL_SECRET=YOUR_LINE_CHANNEL_SECRET
LINE_LIFF_ID=YOUR_LINE_LIFF_ID
LINE_LOGIN_CHANNEL_ID=YOUR_LINE_LOGIN_CLIENT_ID

FILE_MAX_SIZE=5MB
SPACE_PER_USER=200MB

ALLOW_FILE_TYPE=pdf,csv,txt
  1. Set the API keys, model parameters, and other settings.
Edit this page
Last Updated:
Contributors: ADT109119
Prev
Installation & Deployment
Next
Contact Information