Sign inSign up

pierre3/line-hf-bot

By pierre3

โ€ขUpdated about 1 month ago

LINE bot bringing Hugging Face AI (chat, image gen/edit, video) to LINE. .NET 10, run via Docker.

Image
0

1.0K

pierre3/line-hf-bot repository overview

โ line-hf-bot

A LINE bot that uses Hugging Face models for AI chat, image generation & editing, image Q&A, and video generation โ€” built on ASP.NET (.NET 10). Run this image on your PC (exposed through a tunnel) or on a cloud host, connect it to a LINE Messaging API channel, and chat with Hugging Face models straight from LINE.

โ Supported tags

  • latest โ€” the most recent release
  • 1.2.3, 1.2 โ€” pinned semantic-version tags

Multi-arch: linux/amd64 and linux/arm64. The runtime is an Ubuntu chiseled (distroless-style) image โ€” no shell or package manager, non-root by default, minimal CVE surface.

โ Quick start

Create a .env file (fill in your own values):

Line__ChannelSecret=<your channel secret>
Line__ChannelAccessToken=<your channel access token>
HuggingFace__ApiKey=hf_xxxxxxxxxxxxxxxxx
App__PublicBaseUrl=https://<your-public-host>

App__PublicBaseUrl is the public HTTPS URL where LINE can reach this app (a tunnel URL when running locally, or the cloud host's HTTPS endpoint). Then:

docker run --env-file .env -p 8080:8080 pierre3/line-hf-bot:latest
curl http://localhost:8080/health      # -> {"status":"ok"}

Point your LINE channel's webhook at https://<your-public-host>/webhook and start chatting.

Full walkthrough (tunnel, .env parameter reference, LINE setup, troubleshooting): https://github.com/pierre3/line-hf-bot/blob/main/docs/deploy/docker-hub.mdโ  ยท Azure Container Apps: https://github.com/pierre3/line-hf-bot/blob/main/docs/deploy/azure-container-apps.mdโ 

โ What you can do

  • ๐Ÿ’ฌ Chat with conversation history
  • ๐ŸŽจ Image generation โ€” /image <prompt> or switch to Image mode
  • ๐Ÿ–ผ๏ธ Image editing โ€” edit a generated image or a photo you send (image-to-image, via fal-ai)
  • ๐Ÿ” Ask about an image โ€” ask about a photo you send or an image the bot made (vision/VQA), and keep asking follow-up questions in context; on by default, same HF credits as chat
  • ๐ŸŽฌ Video โ€” /video <prompt> (text-to-video) and ๐ŸŽฌ Make a video from an image (image-to-video), both via fal-ai; off by default
  • ๐ŸŽ›๏ธ A rich menu switches modes; English / Japanese UI (App__Locale)

โ Configuration

Everything is set through environment variables (Section__Key, double underscore). The four above are the minimum; models, providers, timeouts, and behavior all have sensible defaults. Full reference: https://github.com/pierre3/line-hf-bot/blob/main/docs/deploy/docker-hub.md#parameter-referenceโ 

โ Release history

  • 1.2.0 โ€” Conversational vision follow-up: keep asking about the same image in context, plus a ๐Ÿ’ฌ Ask button on generated/edited image results (App__VisionMaxTurns).
  • 1.1.1 โ€” Videos now play inline in LINE (HTTP range support on /media).
  • 1.1.0 โ€” Image Q&A (vision/VQA) on sent photos, and ๐ŸŽฌ image-to-video ("Make a video" from an image).
  • 1.0.1 โ€” Chiseled runtime image (fewer CVEs); Docker Hub Overview.
  • 1.0.0 โ€” First public release: chat, image generation & editing, text-to-video, rich menu, EN/JA UI.

Full changelog: https://github.com/pierre3/line-hf-bot/blob/main/CHANGELOG.mdโ 

โ Important: state is in memory

Conversation history and generated media live only in process memory (with a TTL cache) and are lost on restart. There is no database. Run exactly one instance โ€” this image is not designed for horizontal scaling. See the project's Limitations section for details.

โ License

MITโ  ยท ยฉ 2026 Hirotada Kobayashi

Tag summary

Content type

Image

Digest

sha256:b17ffa001โ€ฆ

Size

70.9 MB

Last updated

about 1 month ago

docker pull pierre3/line-hf-bot