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
620
What's New in Firebase 2024
firebasethailand
1
250
Adding New Capabilities to Your Apps with Firebase and Gemini API
firebasethailand
1
260
Say Hello to Cloud Functions for Firebase 2nd Gen
firebasethailand
1
470
What's New in Firebase 2023
firebasethailand
3
600
Building a more Efficient Firestore Web App
firebasethailand
1
200
Developing with Firebase - Best Practices
firebasethailand
0
210
Analyze your production issue on Firebase Crashlytics more efficient with BigQuery
firebasethailand
0
440
What I learn from Firebase when build Saifah
firebasethailand
0
150
Other Decks in Technology
See All in Technology
フィッシュボウルのやり方 / How to do a fishbowl
pauli
2
420
20251203_AIxIoTビジネス共創ラボ_第4回勉強会_BP山崎.pdf
iotcomjpadmin
0
150
AI with TiDD
shiraji
1
310
Strands Agents × インタリーブ思考 で変わるAIエージェント設計 / Strands Agents x Interleaved Thinking AI Agents
takanorig
6
2.3k
ハッカソンから社内プロダクトへ AIエージェント「ko☆shi」開発で学んだ4つの重要要素
sonoda_mj
6
1.8k
20251219 OpenIDファウンデーション・ジャパン紹介 / OpenID Foundation Japan Intro
oidfj
0
550
Authlete で実装する MCP OAuth 認可サーバー #CIMD の実装を添えて
watahani
0
240
AIBuildersDay_track_A_iidaxs
iidaxs
4
1.5k
AR Guitar: Expanding Guitar Performance from a Live House to Urban Space
ekito_station
0
270
LayerX QA Night#1
koyaman2
0
280
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
9.9k
Agent Skillsがハーネスの垣根を超える日
gotalab555
6
4.7k
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
A Modern Web Designer's Workflow
chriscoyier
698
190k
We Are The Robots
honzajavorek
0
120
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Code Review Best Practice
trishagee
74
19k
Why Our Code Smells
bkeepers
PRO
340
57k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
120
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
350
ラッコキーワード サービス紹介資料
rakko
0
1.8M
The Curious Case for Waylosing
cassininazir
0
200
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.9k
AI: The stuff that nobody shows you
jnunemaker
PRO
1
35
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
ありがとうございます