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
Google製LLM PaLM2と対話できるLINE_Botを爆速開発ハンズオン
Search
Kento.Yamada
October 11, 2023
Programming
0
140
Google製LLM PaLM2と対話できるLINE_Botを爆速開発ハンズオン
Kento.Yamada
October 11, 2023
Tweet
Share
More Decks by Kento.Yamada
See All by Kento.Yamada
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
200
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
1
120
Agent Development Kit (ADK) でLINE Botを作ってみた
ymd65536
0
96
ビカム・ア・コパイロット
ymd65536
1
220
GitHub Copilot for Azureってなんだろう
ymd65536
1
72
GitHub Copilot for Azureを使い倒したい
ymd65536
1
430
By the way Google Cloud Next 2025に行ってみてどうだった
ymd65536
0
140
Azure Developer CLIの最新アップデートを追う
ymd65536
1
210
PromptyによるAI開発入門
ymd65536
1
410
Other Decks in Programming
See All in Programming
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
980
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
460
Kotlin エンジニアへ送る:Swift 案件に参加させられる日に備えて~似てるけど色々違う Swift の仕様 / from Kotlin to Swift
lovee
1
260
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
560
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
230
NPOでのDevinの活用
codeforeveryone
0
400
GraphRAGの仕組みまるわかり
tosuri13
8
490
ASP.NETアプリケーションのモダナイズ インフラ編
tomokusaba
1
420
WindowInsetsだってテストしたい
ryunen344
1
200
関数型まつり2025登壇資料「関数プログラミングと再帰」
taisontsukada
2
850
型付きアクターモデルがもたらす分散シミュレーションの未来
piyo7
0
810
Beyond Portability: Live Migration for Evolving WebAssembly Workloads
chikuwait
0
390
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
YesSQL, Process and Tooling at Scale
rocio
173
14k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
Into the Great Unknown - MozCon
thekraken
39
1.9k
The World Runs on Bad Software
bkeepers
PRO
69
11k
Designing for Performance
lara
609
69k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
5
220
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.8k
We Have a Design System, Now What?
morganepeng
53
7.7k
It's Worth the Effort
3n
185
28k
Transcript
Google製LLM「PaLM2」と対話できるLINE Botを 爆速開発ハンズオン 1
本日やること • 本日やること • 自己紹介 • 完成品の動作 • 構成 •
今回使う技術 • VertexAIとは • PaLM2とは • CloudRunとは • 実際に作ろう • まとめ 2
自己紹介 3 Amazon ベストセラー獲得 Kento.Yamada (github,Twitter,zenn,Qiita@ymd65536) 経歴 • 2022年10月~現在 虎ノ門のCIer
◦ Multi Cloud Developer • (2016年~2022年9月)某通信キャリアの子会社 ◦ ITスペシャリスト
完成品の動作 4 デモをやります!
全体構成 5 Artifact Registry Cloud Run Vertex AI
デプロイ時の構成 6 Artifact Registry Cloud Run 2.コンテナイメージをpull 1.イメージをpush
Vertex AIとの疎通確認 7 Cloud Run Vertex AI 2. text-bison@001のAPIを実行 1.
エンドポイント接続 (GETリクエスト) 3.結果を取得 4.ブラウザで結果を参照
LINE botからVertex AIのAPIを実行 8 Cloud Run 1.Webhookによる接続 Vertex AI 2.
chat-bison@001のAPIを実行 2. chat-bison@001のAPIを実行 3.結果を取得 4.LINEアプリ上で結果を閲覧
今回使う技術 • LINE API ◦ Messaging API • Google Cloud
◦ CloudRun ◦ Artifact Registry ◦ Vertex AI 9
LINE Messaging API 👈詳しく知りたい人はこちら 10 https://www.youtube.com/watch?v=KiuLRTSuTzg
CloudRunとは コンテナを実行できるマネージドサービス 特徴 • サーバレスコンピューティング • 受信リクエストに合わせて、コンテナが自動的にスケール 今回はジョブではなく、サービスとしてコンテナを実行 LINE Messaging
APIのWebhook URLとして利用 11 CloudRunの料金:https://cloud.google.com/run/pricing?hl=ja
Artifact Registryとは 12 次世代の Container Registry 特徴 • パッケージと Docker
コンテナイメージを1 か所で保管し、管理できる • CloudBuildのアーティファクトを保存する場所として利用できる Caution 現在はContainer Registryではなく、Artifact Registryが推奨されています! 今回はCloudRunに使うコンテナのイメージを保存するために利用 Artifact Registryの料金:https://cloud.google.com/artifact-registry/pricing?hl=ja
VertexAIとは 13 エンタープライズ対応の生成 AI でイノベーションを加速する 特徴 • さまざまなAIモデルの提供およびトレーニング • 検証にちょうどいいGenerative
AI Studio • もちろん、PaLM2も提供 今回はCloudRunからVertex AIのAPIを実行してAIを呼び出す
PaLM2とは • Google が開発した最新のLLMであり、PaLMの後継 • 4種類のモデル:Gecko、Otter、Bison、Unicorn • 25 を超える Google
の製品と機能に搭載 なお、読み方は「パーム」 14 引用元:PaLM 2 のご紹介 https://japan.googleblog.com/2023/05/palm-2.html
Vertex AIでPaLM2を利用する時 1. text prompts a. 一問一答という形で利用する 2. chat prompts
a. 文字通りチャット、コンテキスト(文脈)を理解して返信 3. text embeddings a. テキスト同士の類似性を測定して返信 15
Vertex AI における生成 AI サポートの料金 16 Vertex AI における生成 AI
サポートの料金:https://cloud.google.com/vertex-ai/pricing?hl=ja 1,000文字あたり、$0.0010 1,000文字あたり、$0.0005
実際に作ろう 百聞は一つのハンズオンにしかず!! 17
まとめ • 今回はCloudRunを使ってVertexAIを実行した • VertexAIを使うと手軽に生成AIが扱える! • PaLM2は比較的に安い!すごい! • まだまだ知見は少ないけども、可能性は無限大! 18