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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kento.Yamada
October 11, 2023
Programming
160
0
Share
Google製LLM PaLM2と対話できるLINE_Botを爆速開発ハンズオン
Kento.Yamada
October 11, 2023
More Decks by Kento.Yamada
See All by Kento.Yamada
.NETとA2Aプロトコルの現在地
ymd65536
0
25
Google Cloud上の.NETでA2A環境を構築できる説
ymd65536
0
30
現場を渡り歩く中で技術者として大事なことを学んだ話
ymd65536
0
71
さまざまなAgent FrameworkとAIエージェントの評価
ymd65536
1
480
AIエージェントの開発と評価、GenAIOps(LLM Ops)
ymd65536
1
350
C#および.NETに対する誤解をひも解くPart2
ymd65536
0
46
AIエージェント開発、DevOps and LLMOps
ymd65536
1
690
なぜ発信するのか。何を伝えるのか Qiita Tech Festa 2025の結果報告
ymd65536
0
110
Google ADKを使ったメディア生成AI入門(概要)
ymd65536
1
170
Other Decks in Programming
See All in Programming
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
130
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
2
150
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
170
Rethinking API Platform Filters
vinceamstoutz
0
11k
Coding as Prompting Since 2025
ragingwind
0
770
アーキテクチャモダナイゼーションとは何か
nwiizo
17
4.7k
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
3
510
PDI: Como Alavancar Sua Carreira e Seu Negócio
marcelgsantos
0
110
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
230
10年分の技術的負債、完済へ ― Claude Code主導のAI駆動開発でスポーツブルを丸ごとリプレイスした話
takuya_houshima
0
2.2k
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
620
3分でわかるatama plusのQA/about atama plus QA
atamaplus
0
130
Featured
See All Featured
WCS-LA-2024
lcolladotor
0
520
Practical Orchestrator
shlominoach
191
11k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
310
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
330
Chasing Engaging Ingredients in Design
codingconduct
0
170
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
500
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
110
Building AI with AI
inesmontani
PRO
1
870
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
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