Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Chatting with Japanese using Firebase Extensions
Search
Firebase Thailand
November 09, 2019
Technology
0
310
Chatting with Japanese using Firebase Extensions
Get to know how to build Translator Chatbot in LINE using Firebase Extensions
Firebase Thailand
November 09, 2019
Tweet
Share
More Decks by Firebase Thailand
See All by Firebase Thailand
From Live Coding to Vibe Coding with Firebase Studio
firebasethailand
1
710
What's New in Firebase 2024
firebasethailand
1
270
Adding New Capabilities to Your Apps with Firebase and Gemini API
firebasethailand
1
270
Say Hello to Cloud Functions for Firebase 2nd Gen
firebasethailand
1
480
What's New in Firebase 2023
firebasethailand
3
620
Building a more Efficient Firestore Web App
firebasethailand
1
220
Developing with Firebase - Best Practices
firebasethailand
0
220
Analyze your production issue on Firebase Crashlytics more efficient with BigQuery
firebasethailand
0
450
What I learn from Firebase when build Saifah
firebasethailand
0
160
Other Decks in Technology
See All in Technology
「通るまでRe-run」から卒業!落ちないテストを書く勘所
asumikam
2
770
FlutterでPiP再生を実装した話
s9a17
0
210
契約書からの情報抽出を行うLLMのスループットを、バッチ処理を用いて最大40%改善した話
sansantech
PRO
3
300
Phase05_ClaudeCode入門
overflowinc
0
2.4k
DDD×仕様駆動で回す高品質開発のプロセス設計
littlehands
6
2.6k
Astro Islandsの 内部実装を 「日本で一番わかりやすく」 ざっくり解説!
knj
0
290
How to install a gem
indirect
0
1.7k
ThetaOS - A Mythical Machine comes Alive
aslander
0
200
SSoT(Single Source of Truth)で「壊して再生」する設計
kawauso
2
380
データマネジメント戦略Night - 4社のリアルを語る会
ktatsuya
1
410
Change Calendarで今はOK?を仕組みにする
tommy0124
1
120
MCPで決済に楽にする
mu7889yoon
0
130
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
140
Deep Space Network (abreviated)
tonyrice
0
96
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
270
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
700
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
140
Exploring anti-patterns in Rails
aemeredith
2
290
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.5k
Writing Fast Ruby
sferik
630
63k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Done Done
chrislema
186
16k
Context Engineering - Making Every Token Count
addyosmani
9
780
Why Our Code Smells
bkeepers
PRO
340
58k
Transcript
GDG Thailand Firebase Thailand Organized by Chatting with Japanese using
Firebase Extensions Firebase Extensionsを使用して日本人とチャットする Warit Wanwithu LINE Thailand
#FirebaseDevDay DEVELOPERS นักพัฒนา デベロッパーズ
#FirebaseDevDay “How’s it Going” “Hello!”
None
#FirebaseDevDay Sending Email Resize Images Deleted User Data
https://github.com/firebase/functions-samples
#FirebaseDevDay ファイアーベース エクステンションズ
None
#FirebaseDevDay Install Functions Firestore Send email
None
#FirebaseDevDay DEMO デモ
#FirebaseDevDay CHATTING チャッティング
#FirebaseDevDay Functions Extensions Firestore 1.Webhook 2.Save 3.Translated 5.Push 4.Trigger
#FirebaseDevDay ❤ 0. Install Translation extension 1. Create LINE Chatbot
2. Handle LINE Webhook using Cloud Functions and save to Firestore 3. Listen to Firestore trigger and push message back to LINE group
1. Create LINE Chatbot https://developers.line.biz/
#FirebaseDevDay { "destination": "xxxxxxxxxx", "events": [{ "replyToken": "0f3779fba3b349968c5d07db31eab56f", "type": "message",
"timestamp": 1462629479859, "source": { "type": "user", "userId": "U4af4980629..." }, "message": { "id": "325708", "type": "text", "text": "Hello" } }]} 2. Handle LINE Webhook
#FirebaseDevDay exports.LineWebhook = functions.region(region).runWith(runtimeOpts) .https.onRequest(async (req, res) => { let
event = req.body.events[0]; if (event.message.type === 'text') { let input = event.message.text; await admin.firestore().collection('translations').doc('inputText') .set({ input: input }); } return res.status(200).send(req.method);; });
#FirebaseDevDay Functions Extensions Firestore Webhook Save Translated Push Trigger 3.
Listen to Firestore trigger
#FirebaseDevDay exports.LineBotPush = functions.region(region).runWith(runtimeOpts) .firestore.document('translations/inputText').onWrite(async (change, context) => { let
latest = change.after.data(); let input = latest.input; let containsJapanese = input.match(/[\u3000-\u303f\u3040-...]/); if (containsJapanese) { push(GROUP_ID, latest.translated.th); } else { push(GROUP_ID, latest.translated.ja); } });
None
#FirebaseDevDay MISSION ミッション
#FirebaseDevDay INSTALL CLOUD FUNCTIONS OPEN SOURCE CONFIG BETA
Thank You! #FirebaseDevDay Helpful resources fb.com/LINEDevTH fb.com/groups/LINEDevTH medium.com/LINEDevTH Warit Wanwithu
ありがとうございます