| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This project is a LINE bot that uses Google's Vertex AI Gemini models through LangChain to generate responses to both text and image inputs. The bot can answer questions in Traditional Chinese and provide detailed descriptions of images.
Clone the repository to your local machine.
Set up Google Cloud:
Set the following environment variables:
Install the required dependencies:
pip install -r requirements.txt
Start the FastAPI server:
uvicorn main:app --reload
Set up your LINE bot webhook URL to point to your server's endpoint.
Send any text message to the LINE bot, and it will use Vertex AI's Gemini model to generate a response in Traditional Chinese.
Send an image to the bot, and it will analyze and describe the image with scientific detail in Traditional Chinese.
Use ngrok or similar tools to expose your local server to the internet for webhook access:
Install the Google Cloud SDK and authenticate with your Google Cloud account.
Build the Docker image:
gcloud builds submit --tag gcr.io/$GOOGLE_PROJECT_ID/linebot-gemini
Deploy the Docker image to Cloud Run:
gcloud run deploy linebot-gemini --image gcr.io/$GOOGLE_PROJECT_ID/linebot-gemini --platform managed --region $GOOGLE_LOCATION --allow-unauthenticated
Set up your LINE bot webhook URL to point to the Cloud Run service URL.
| Back | FazBrowse Home | New Git URL |