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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Firebase Thailand
November 09, 2019
Technology
310
0
Share
Chatting with Japanese using Firebase Extensions
Get to know how to build Translator Chatbot in LINE using Firebase Extensions
Firebase Thailand
November 09, 2019
More Decks by Firebase Thailand
See All by Firebase Thailand
From Live Coding to Vibe Coding with Firebase Studio
firebasethailand
1
720
What's New in Firebase 2024
firebasethailand
1
270
Adding New Capabilities to Your Apps with Firebase and Gemini API
firebasethailand
1
280
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
460
What I learn from Firebase when build Saifah
firebasethailand
0
160
Other Decks in Technology
See All in Technology
QA組織のAI戦略とAIテスト設計システムAITASの実践
sansantech
PRO
1
270
OCI技術資料 : ロード・バランサ 概要 - FLB・NLB共通
ocise
4
27k
昔話で振り返るAWSの歩み ~S3誕生から20年、クラウドはどう進化したのか~
nrinetcom
PRO
0
120
ThetaOS - A Mythical Machine comes Alive
aslander
0
230
Why we keep our community?
kawaguti
PRO
0
350
OCI技術資料 : 証明書サービス概要
ocise
1
7.1k
不確実性と戦いながら見積もりを作成するプロセス/mitsumori-process
hirodragon112
1
160
AI時代のIssue駆動開発のススメ
moongift
PRO
0
310
AIエージェント勉強会第3回 エージェンティックAIの時代がやってきた
ymiya55
0
180
FastMCP OAuth Proxy with Cognito
hironobuiga
3
230
Physical AI on AWS リファレンスアーキテクチャ / Physical AI on AWS Reference Architecture
aws_shota
1
200
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
3
2k
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
5k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
160
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.6k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
700
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
ラッコキーワード サービス紹介資料
rakko
1
2.8M
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
87
AI: The stuff that nobody shows you
jnunemaker
PRO
4
500
エンジニアに許された特別な時間の終わり
watany
106
240k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Between Models and Reality
mayunak
2
250
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
ありがとうございます