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
LangChainを使ってChatGPTの機能を拡張してみた ~過去の会話やGoogle検索結...
Search
TakaakiKakei
July 10, 2023
Technology
1
2.4k
LangChainを使ってChatGPTの機能を拡張してみた ~過去の会話やGoogle検索結果を活用して自然な応答を生成する方法~ #DevIO2023
DevelopersIO 2023 で発表した資料です。
TakaakiKakei
July 10, 2023
Tweet
Share
More Decks by TakaakiKakei
See All by TakaakiKakei
企業向け生成AIアプリの 開発から得られた知見
takaakikakei
0
430
「AWSによる独自データ活用の生成AIソリューション」というタイトルでCM re:Growth 2023に登壇しました #AWSreInvent #cmregrowth
takaakikakei
0
940
Slack Boltコース!AWS Lambda & Pythonのビキナー仕立て #devio2022
takaakikakei
0
5.1k
AWS Step Functions上でエラーが発生した場合の効果的な通知方法を検討してみた
takaakikakei
0
7k
Other Decks in Technology
See All in Technology
OR学会2024秋_短期収益と将来のオフ方策評価性能を考慮したクーポン割当方策混合比の決定
recruitengineers
PRO
4
480
プロダクトエンジニアを支えるための開発生産性向上施策
tsukakei
0
150
DuckDB雑紹介(1.1対応版)@DuckDB座談会
ktz
6
1.4k
AIを活用した柔軟かつ効率的な社内リソース検索への取り組み
cygames
0
210
フロントエンド開発事例③ Yahoo! JAPAN トップページ
lycorptech_jp
PRO
0
110
チームビルディングは"感性"で向き合おう / Team Building with Awareness
kohzas
0
280
再考 アクターモデル/ reconsider actor model
ytake
0
380
DroidKaigi 2024 たすけて!ViewModel
mhidaka
5
1.1k
PDF Viewer作成の今までとこれから
hunachi
0
480
JEP 480: Structured Concurrency
aya_ebata
0
130
開発者の定量・定性データを組み合わせて開発者体験を把握するための取り組み
ham0215
1
180
Oracle Autonomous Database:サービス概要のご紹介
oracle4engineer
PRO
1
7.1k
Featured
See All Featured
RailsConf 2023
tenderlove
28
820
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.4k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
158
15k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
26
3.9k
Designing Experiences People Love
moore
138
23k
What’s in a name? Adding method to the madness
productmarketing
PRO
21
3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
41
6.5k
Imperfection Machines: The Place of Print at Facebook
scottboms
263
13k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
363
22k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
27
7.4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
45
4.8k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
1
55
Transcript
LangChainΛͬͯ ChatGPTͷػೳΛ֦ுͯ͠Έͨ ~աڈͷձGoogleݕࡧ݁ՌΛ׆༻ ͯࣗ͠વͳԠΛੜ͢Δํ๏~ 2023/07/08 ߶জʢTakaaki Kakeiʣ
Hello!! ߶জʢTakaaki Kakeiʣ •AWSࣄۀຊ෦ΦϖϨʔγϣϯ෦ αʔϏεάϩʔενʔϜ •ΫϥεϝιουϝϯόʔζΛ ࢧ͑Δ։ൃΛ୲ •ٱ͠ͿΓͷϥΠϒηογϣϯͰ ϫΫϫΫ͍ͯ͠·͢ʂ
2 ɾ2023-2021 Japan AWS Top Engineers ɾ2023-2022 Japan AWS All Certifications Engineers ɾhttps://dev.classmethod.jp/author/kakei-takaaki/ ɾhttps://zenn.dev/t_kakei ɾhttps://twitter.com/TakaakiKakei
ChatGPTͱ •OpenAI͕202211݄ʹެ։ͨ͠ਓೳνϟοτϘοτ •ਓؒͷΑ͏ͳࣗવͳձ͕Ͱ͖Δ •จষͷཁɾ༁ɾϓϩάϥϜͷੜͳͲɺ༷ʑͳλεΫΛ ࣮ߦՄೳ 3 ຊʹೖΔલʹ͓͞Β͍
େنݴޠϞσϧʢLLMʣͱ •େྔͷςΩετσʔλΛͬͯτϨʔχϯά͞Εͨࣗવݴޠ ॲཧͷϞσϧ •ChatGPTɿGPT-3.5 / GPT-4 4 ͓͞Β͍2
OpenAI APIͱ •OpenAIͷLLMʢGPT-3ͳͲʣ ʹAPIͰΞΫηε͢Δ͜ͱΛ Մೳʹͨ͠ϓϥοτϑΥʔϜ •։ൃऀ͕ࣗͷΞϓϦέʔ γϣϯʹLLMͷػೳΛΈࠐ Ήࡍʹར༻Ͱ͖Δ 5 ͓͞Β͍3
IUUQTQMBUGPSNPQFOBJDPNEPDT HVJEFTHQUDIBUDPNQMFUJPOTBQJ
IUUQTHJUIVCDPNIXDIBTFMBOHDIBJO LangChain 6
LLMΛ׆༻ͨ͠ߴͳΞϓϦέʔγϣϯͷ։ൃΛָʹ͠ ͯ͘ΕΔϑϨʔϜϫʔΫ •LLMͱGoogleݕࡧΛ࿈ܞͨ͠ΞϓϦ •ࢦఆτʔΫϯͰձཤྺΛͭΞϓϦ •ಠࣗσʔλΛݩʹճ͢ΔΞϓϦ 7 LangChainͱ
•ศརϞδϡʔϧ͕༻ҙ͞Ε͓ͯΓɺͦΕΒΛΈ߹ΘͤΔ͜ ͱͰɺෳࡶͳॲཧΛߦ͏ΞϓϦέʔγϣϯ͕։ൃͰ͖Δɻ •OpenAIͷLLMҎ֎ɺ༷ʑͳLLMΛαϙʔτ͍ͯ͠Δɻ •GoogleݕࡧͳͲ࿈ܞՄೳͳ֎෦αʔϏεଟ͘αϙʔτɻ •PythonJavaScript / TypeScriptͰར༻Մೳɻ 8 LangChainͷಛ
LangChainΛར༻ͨ͠ΞϓϦ։ൃͷྲྀΕ 1. ։ൃڥͷ४උ 2. LangChainͷཧղͱ࣮ફ 3. WebΞϓϦέʔγϣϯ։ൃ 9
•ϓϩάϥϜΛಈ͔͢ϋʔυϧ͕Լ͕Δ͜ͱ •LangChainͷརͱ༻ํ๏ʹؔ͢Δཧղ͕ਂ·Δ͜ͱ •LangChainΛར༻ͨ͠LLMͷΞϓϦέʔγϣϯެ։ͷݟ ΛਂΊΔ͜ͱ 10 ຊηογϣϯͷඪ
LangChainΛར༻ͨ͠ΞϓϦ։ൃͷྲྀΕ 1. ։ൃڥͷ४උ 2. LangChainͷཧղͱ࣮ફ 3. WebΞϓϦέʔγϣϯ։ൃ 11
(PPHMF$PMBCPSBUPSZʢུশɿ$PMBCʣ IUUQTDPMBCSFTFBSDIHPPHMFDPN ͓͢͢Ίͷ։ൃڥ 12
ॆͳ։ൃڥ •ڥߏஙෆཁͰPythonίʔυΛهड़ɺ࣮ߦͰ͖Δ •GoogleΞΧϯτ͕͋Εϒϥβܦ༝Ͱ͙͢ʹ͑Δ •ແྉͷGPUΛఏڙ͓ͯ͠ΓɺߴͳܭࢉΛߦ͑Δ •Google Driveͱͷ࿈ܞͰɺೖग़ྗͷظอଘ͕Մೳ •ແྉϓϥϯͷ߹ɺ࠷Ͱ12࣮࣌ؒߦՄೳ 13 Colabͷಛ
(PPHMFΞΧϯτʹϩάΠϯͨ͠ঢ়ଶͰɺ$PMBCͷ63-ʹΞΫηε IUUQTDPMBCSFTFBSDIHPPHMFDPN Colabͷར༻ํ๏ 14
ʮϊʔτϒοΫΛ৽ن࡞ʯΛΫϦοΫ Colabͷར༻ํ๏ 15
৽͍͠ϊʔτϒοΫ͕։͖ɺۭͷηϧ͕දࣔ͞ΕΔ 16 Colabͷར༻ํ๏
ηϧʹίʔυΛهड़Ͱ͖Δ Colabͷར༻ํ๏ 17
ʮηϧͷ࣮ߦʯϘλϯΛԡ͢ͱɺηϧͷίʔυ͕࣮ߦ͞ΕΔ Colabͷར༻ํ๏ 18
ʮ ίʔυʯΛΫϦοΫ͢Δͱɺηϧ͕Ճ͞Ε Ճͷίʔυ͕ೖྗͰ͖Δ Colabͷར༻ํ๏ 19
20 ChatGPTͷAPIΛಈ͔ͯ͠ΈΔ
ඞཁͳϥΠϒϥϦΛΠϯετʔϧ ChatGPTͷAPIΛ࣮ߦͯ͠ΈΔ 21
ڥมʹ0QFO"*"1*ΩʔΛηοτ 22 ChatGPTͷAPIΛ࣮ߦͯ͠ΈΔ
νϟοτ༻ͷ"1*Λ࣮ߦ 23 ChatGPTͷAPIΛ࣮ߦͯ͠ΈΔ
Colab •Google͕ແྉఏڙ͢ΔΫϥυϕʔεͷPython࣮ߦڥ •GoogleΞΧϯτ͕͋Εϒϥβܦ༝Ͱ͙͑͢Δ •ແྉͷGPUGoogleυϥΠϒͱͷσʔλ࿈ܞՄೳ 24 1ষͷ·ͱΊ
LangChainΛར༻ͨ͠ΞϓϦ։ൃͷྲྀΕ 1. ։ൃڥͷ४උ 2. LangChainͷཧղͱ࣮ફ 3. WebΞϓϦέʔγϣϯ։ൃ 25
LLMΛ׆༻ͨ͠ߴͳΞϓϦέʔγϣϯͷ։ൃΛָʹ͠ ͯ͘ΕΔϑϨʔϜϫʔΫ •LLMͱGoogleݕࡧΛ࿈ܞͨ͠ΞϓϦ •ࢦఆτʔΫϯͰձཤྺΛͭΞϓϦ •ಠࣗσʔλΛݩʹճ͢ΔΞϓϦ 26 LangChainͱʢ࠶ܝʣ
•ศརͳϞδϡʔϧ͕༻ҙ͞Ε͓ͯΓɺͦΕΒΛΈ߹ΘͤΔ ͜ͱͰɺෳࡶͳॲཧΛߦ͏ΞϓϦέʔγϣϯ͕։ൃͰ͖Δɻ •༷ʑͳLLMΛαϙʔτɻ •࿈ܞՄೳͳ֎෦αʔϏεଟ͍ɻ •PythonJavaScript / TypeScriptͰར༻Մೳɻ 27 LangChainͷಛʢ࠶ܝʣ
28 ͲͷΑ͏ͳϞδϡʔϧ͕͋Δ͔
•ModelsɿLLMͷݺͼग़͠ػೳ •Promptsɿೖྗใ͔ΒϓϩϯϓτΛ࡞͢Δػೳ •ChainsɿLLMPromptsͷೖग़ྗΛܨ͛Δػೳ •Memoryɿձཤྺͷอଘػೳ •AgentsɿͲΜͳखஈɾॱংͰ࣮ߦ͢Δ͔ܾఆ͢Δػೳ 29 LangChainͷओͳϞδϡʔϧ
LLMͷݺͼग़͠ػೳ •OpenAIͷLLMʢGPT-3GPT-4ʣͳͲɺ༷ʑͳαʔϏε͕ఏ ڙ͍ͯ͠ΔϞσϧΛར༻Ͱ͖Δػೳ •LLMؒͰΠϯλʔϑΣʔε͕ڞ௨Խ͞Ε͍ͯΔҝɺҟͳΔ LLMΛར༻͢Δ͔࣌Γ͍͢ 30 Modelsͱ
•Anthropic •Azure •Bedrock •Google Cloud Platform Vertex AI PaLM •OpenAI
ͳͲ https://python.langchain.com/docs/modules/model_io/models/llms/ 31 ࢀߟɿαϙʔτ͞Ε͍ͯΔαʔϏεྫ
ඞཁͳϥΠϒϥϦΛΠϯετʔϧͯ͠ɺڥมΛηοτ Modelsͷ͍ํ 32
0QFO"*ͷ--.ʢ(15ʣΛར༻ .PEFMΛॳظԽ͠ɺϝοηʔδͷϦετΛ༩࣮͑ͯߦ Modelsͷ͍ํ 33
0QFO"*ͷ--.ʢ(15ʣ ҟͳΔLLMͷΠϯλʔϑΣʔεͷൺֱ 34 "OUISPQJDͷ--. ˠҟͳΔ--.Ͱಉ͡Α͏ͳݺͼग़͠ํͰ࣮ߦͰ͖Δ
ೖྗใ͔ΒϓϩϯϓτΛ࡞͢Δػೳ •ϓϩϯϓτతͷճΛಘΔͨΊʹॏཁͳཁૉ •LangChainϓϩϯϓτͷૢ࡞ͱߏஙΛ؆୯ʹ͢ΔػೳΛఏ ڙ •ྫ͑ɺϓϩϯϓτςϯϓϨʔτͷҰ෦ͷมΛɺϓϩά ϥϛϯάͷೖྗͰஔ͖͑Δ͜ͱ͕Ͱ͖Δ 35 Promptsͱ
ඞཁͳϥΠϒϥϦΛΠϯετʔϧͯ͠ɺڥมΛηοτ Promptsͷ͍ํ 36
ϓϩϯϓτͷςϯϓϨʔτʹ৯͍ͷΑ͏ʹมΛࠐΉ͜ͱ͕Ͱ͖Δ ϓϩάϥϛϯά࣮ߦ࣌ʹॊೈʹςϯϓϨʔτΛͰ͖Δ Promptsͷ͍ํ 37
ॊೈʹϓϩϯϓτςϯϓϨʔτΛมߋͰ͖ΔΑ͏ʹͳΓɺ ෳࡶͳλεΫ͕Γ͘͢ͳΔ Promptsͷ͍ํ 38
ModelsPromptsͷೖग़ྗΛܨ͛Δػೳ •ModelsͱPromptsͱ͍ͬͨϞδϡʔϧΛ࿈࣮݁ͯ͠ߦ͕Ͱ͖ Δ •ModelsͱPromptsͷΈ߹ΘͤΛɺผͷModelsͱPromptsͷ Έ߹Θͤʹ࿈݁͢Δ͜ͱՄೳ •͜ͷΑ͏ʹϞδϡʔϧΛ؆୯ʹ࿈݁Ͱ͖Δ͜ͱͰɺAPIΛ୯ ମͰར༻͢ΔΑΓָ࣮͕ʹͳͬͯ͘Δ 39 Chainsͱ
ඞཁͳϥΠϒϥϦΛΠϯετʔϧͯ͠ɺڥมΛηοτ Chainsͷ͍ํ 40
.PEFMTͱ1SPNQUTͷίʔυΛ࿈࣮݁ͯ͠ߦ Chainsͷ͍ํ 41
ձཤྺͷอଘػೳ •APIΛར༻͢Δ߹ɺձཤྺͷอଘಠ࣮͕ࣗඞཁ •MemoryΛར༻͢Δ͜ͱͰɺಠ࣮ࣗ෦Λॊೈˍ؆୯ʹ࣮ Մೳ •ྫ͑ɺݹ͍ձཁͯ͠ɺۙͷձͦͷ··อ࣋͢ ΔͷΑ͏ͳॲཧ؆୯ʹ࣮Ͱ͖Δ 42 Memoryͱ
•ConversationBufferWindowMemoryɿۙkݸͷཤྺΛ༻ •ConversationTokenBufferMemoryɿτʔΫϯͰཤྺΛ༻ •ConversationSummaryBufferMemoryɿݹ͍ձཁͯ͠ɺ ۙͷձͦͷ··อ࣋ͯ͠༻ɻ ͳͲ https://python.langchain.com/docs/modules/memory/ 43 ఏڙ͞Ε͍ͯΔMemory
UJLUPLFOʢτʔΫϯΛऔಘ͢ΔʣϥΠϒϥϦΛՃ ConversationSummaryBufferMemoryͷར༻ྫ 44
$IBUNPEFMΛར༻ͯ͠$POWFSTBUJPO4VNNBSZ#V ff FS.FNPSZΛར༻ ཁͱ࠷৽ͭͷΓͱΓ͕อଘ͞Ε͍ͯΔ ConversationSummaryBufferMemoryͷར༻ྫ 45
ͲΜͳखஈɾॱংͰ࣮ߦ͢Δ͔ܾఆ͢Δػೳ •ChainsΑΓෳࡶͳλεΫ࣮ߦՄೳ •ϢʔβʔೖྗʹΑͬͯɺ࣮ߦ͞ΕΔػೳ͕มΘΔ •ॲཧͷྲྀΕɺʮೖྗˠ(ਪˠ࣮ߦˠ؍) * N→ճʯ •GoogleBingͳͲͷ֎෦αʔϏεΛ؆୯ʹར༻Ͱ͖Δػೳ ʢToolsʣͱ࿈ܞՄೳ 46 Agentsͱʁ
•awslambda •Bing Search •ChatGPT Plugins •Google Search •Twilio •Wikipedia •Zapier
Natural Language Actions API ͳͲ https://python.langchain.com/docs/modules/agents/tools/ 47 ࿈ܞͰ͖Δ֎෦αʔϏεʢToolsʣ
•zero_shot_react_descriptionɿReAct ͱ͍͏ਪػೳͱߦಈ ػೳΛ༻͍Δख๏Λ༻ͯ͠ͲͷToolsΛ༻͢Δ͔Λܾఆɻ •conversational-react-descriptionɿReAct Λ༻ͯ͠Ͳͷ ToolsΛ༻͢Δ͔Λܾఆɻ ձʹ࠷దԽ͞Ε͓ͯΓɺ MemoryΛ༻ͯ͠ձཤྺߟྀͰ͖Δɻ https://python.langchain.com/docs/modules/agents/ 48
ఏڙ͞Ε͍ͯΔAgents
%VDLEVDLHPTFBSDIʢݕࡧΤϯδϯʣϥΠϒϥϦΛՃ Agentsͷར༻ྫ 49
%VDLEVDLHPTFBSDIʢݕࡧΤϯδϯʣϥΠϒϥϦΛՃ Agentsͷར༻ྫ 50
•ModelsɿLLMͷݺͼग़͠ػೳ •Promptsɿೖྗใ͔ΒϓϩϯϓτΛ࡞͢Δػೳ •ChainsɿLLMPromptsͷೖग़ྗΛܨ͛Δػೳ •Memoryɿձཤྺͷอଘػೳ •AgentsɿͲΜͳखஈɾॱংͰ࣮ߦ͢Δ͔ܾఆ͢Δػೳ 51 LangChainͷओͳϞδϡʔϧʢ࠶ܝʣ
IUUQTHJUIVCDPNLZSPMBCTBXFTPNFMBOHDIBJO [ࢀߟ]LangChainͷΞοϓσʔτΛ͑ΔαΠτ 52
LangChain •LLMΛ׆༻ͨ͠ߴͳΞϓϦέʔγϣϯ։ൃΛࢧԉ͢Δϑ ϨʔϜϫʔΫ •༻ҙ͞Ε͍ͯΔϞδϡʔϧΛΈ߹ΘͤΔ͜ͱͰɺෳࡶͳॲ ཧ͕࣮͘͢͠ͳΔ •LangChainͷ࠷৽ใΛ͏ͱɺLLMͷ࠷৽ใΩϟον ΞοϓͰ͖ͯҰੴೋௗ 53 2ষͷ·ͱΊ
LangChainΛར༻ͨ͠ΞϓϦ։ൃͷྲྀΕ 1. ։ൃڥͷ४උ 2. LangChainͷཧղͱ࣮ફ 3. WebΞϓϦέʔγϣϯ։ൃ 54
4USFBNMJUʢετϦʔϜϦοτʣ IUUQTTUSFBNMJUJP ͓͢͢ΊͷWebΞϓϦέʔγϣϯϑϨʔϜϫʔΫ 55
•PythonͰWebΞϓϦέʔγϣϯΛ։ൃ͢ΔͨΊͷϑϨʔϜ ϫʔΫ •ֶशίετ͕͘ɺരͰΞϓϦΛ։ൃՄೳ •LangChainͱͷ౷߹ͷυΩϡϝϯτ๛ 56 Streamlitͷಛ
57 ͲΕ͚ͩ؆୯ʹͭ͘ΕΔͷ͔ʁ
10ߦͷίʔυ 58
؆୯ͳνϟοτΞϓϦ͕ 59 IUUQTHJUIVCDPNUBLBBLJLBLFJEFNPTUSFBNMJUMBOHDIBJOCMPCNBJOQBHFTFDIPDIBUVJQZ
30ߦͷίʔυʢLangChainͷॲཧՃʣ 60
IUUQTHJUIVCDPNUBLBBLJLBLFJEFNPTUSFBNMJUMBOHDIBJOCMPCNBJOQBHFTMBOHDIBJOEEH TFBSDIQZ LangChainΛར༻ͨ͠νϟοτΞϓϦ 61
IUUQTEPDTTUSFBNMJUJPLOPXMFEHFCBTFUVUPSJBMTCVJMEDPOWFSTBUJPOBMBQQT [ࢀߟ]StreamlitͷνϡʔτϦΞϧ 62
IUUQTCMPHTUSFBNMJUJPUBHUVUPSJBMT [ࢀߟ]StreamlitͷνϡʔτϦΞϧϒϩά 63
IUUQTHJUIVCDPNNJDSPTPGUB[PBJDIBUHQUTUSFBNMJUIBSOFTT [ࢀߟ]MicrosoftͷϦϙδτϦ 64
65 WebΞϓϦͷެ։ʹ͍ͭͯ
•WebSocketʹରԠ͍ͯ͠ΔαʔϏεʹσϓϩΠ͕ඞཁ •ެࣜͷೝূػೳ͕ఏڙ͞Ε͍ͯͳ͍ •جຊతʹαʔόαΠυͰॲཧ͞ΕΔͨΊɺΞΫηεूத࣌ʹ ෆ҆͋Γ 66 ެ։࣌ͷ՝
•WebSocketʹରԠ͍ͯ͠ΔαʔϏεʹσϓϩΠ͕ඞཁ →Cloud RunͳͲʹσϓϩΠ •ެࣜͷೝূػೳ͕ఏڙ͞Ε͍ͯͳ͍ →σϓϩΠઌͷηΩϡϦςΟαʔϏε or αʔυύʔςΟͷϞδϡʔ ϧΛར༻ https://zenn.dev/google_cloud_jp/articles/streamlit-02- fi
rebase https://zenn.dev/matken/articles/restrict-cloud-run-to-in-house https://github.com/mkhorasani/Streamlit-Authenticator •جຊతʹαʔόαΠυͰॲཧ͞ΕΔͨΊɺΞΫηεूத࣌ʹෆ҆͋Γ →·ͣಈ͘ͷΛ࡞Δͱ͍͏ελϯεͰɺখنͰͷར༻Λݕ౼ 67 StreamlitͰ։ൃͨ͠ΞϓϦͷ՝ˠղܾҊʗߟ
Streamlit •PythonͰWebΞϓϦέʔγϣϯΛ࡞͢ΔͨΊͷϑϨʔϜ ϫʔΫ •ֶशίετ͕͘ɺരͰΞϓϦΛ։ൃՄೳ •খن͚͕ͩɺ͡ΊͷҰาͱ͓ͯ͢͢͠Ί 68 3ষͷ·ͱΊ
LangChainΛར༻ͨ͠ΞϓϦ։ൃͷྲྀΕ 1. ։ൃڥͷ४උ 2. LangChainͷཧղͱ࣮ફ 3. WebΞϓϦέʔγϣϯ։ൃ 69
LangChainΛར༻ͨ͠ΞϓϦ։ൃͷྲྀΕ 1. ։ൃڥͷ४උ 2. LangChainͷཧղͱ࣮ફ 3. WebΞϓϦέʔγϣϯ։ൃ 4. ɿ͓͢͢ΊͷOSS 70
IUUQTHJUIVCDPNNDLBZXSJHMFZDIBUCPUVJ $IBUCPU6* ͓͢͢ΊͷOSS 71
•ChatGPTϥΠΫͳUIΛαΫοͱߏஙͰ͖ΔOSS •GitHubͰͷStarɿ15,000Ҏ্ •Docker fi leͰཧ͞Ε͓ͯΓɺϙʔλϏϦςΟ͕ߴ͍ •EdgeͰಈͨ͘ΊɺதنҎ্Ͱಈ࡞͢Δҹ •NextJSͷܦݧ͕͋ΕɺΧελϚΠζՄೳ 72 Chatbot UIͷಛ
APIΩʔͷηοτޙͷը໘ 73
νϟοτΠϝʔδ 74
•ڥมͰɺOpenAI͔Azure OpenAIΛબՄೳ •ձཤྺΛݩʹͨ͠ճ͕Մೳ •Googleݕࡧ݁ՌΛݩʹͨ͠ճՄೳ •UI্ͰϞσϧબTemperatureͷௐ͕Մೳ 75 Chatbot UIͷػೳ
IUUQTEFWDMBTTNFUIPEKQBSUJDMFTDIBUHQUXFCVJDIBUCPUVJ Chatbot UIΛϩʔΧϧͰಈ͔͢ 76
77 ެ։࣌ͷηΩϡϦςΟͲ͏͢Δ͔ʁ
ύλʔϯ1ɿAWS WAF 78 "848"'Ͱ*1੍ݶ
"848"'Ͱ*1੍ݶ͠ɺ/FYU"VUIͰ"[VSF"%ͳͲͰೝূ ύλʔϯ2ɿAWS WAF + NextAuth 79
$MPVE fl BSFͰθϩτϥετͱೝূػೳΛ࣮ ύλʔϯ3ɿCloud fl are 80
81 ΧελϚΠζʹ͍ͭͯ
ϓϨεϦϦʔεɿIUUQTDMBTTNFUIPEKQOFXTNVMUJHFOFSBUJWFBJTFSWJDF ෳͷLLMΛར༻ग़དྷΔΑ͏ʹΧελϚΠζ 82
IUUQTHJUIVCDPNNDLBZXSJHMFZDIBUCPUVJQVMMT [ࢀߟ]ϓϧϦΫΤετࢀߟʹͳΔ 83
Chatbot UI •ChatGPTϥΠΫͳUIΛαΫοͱ࡞ΕΔOSS •ձཤྺGoogleݕࡧ݁ՌΛݩʹͨ͠ճػೳ͕උ͚͑ •Docker fi leͰσϓϩΠՄೳͳͷͰϙʔλϏϦςΟ͕ߴ͍ •ϋʔυϧߴΊ͕ͩɺΧελϚΠζՄೳ 84 ͷ·ͱΊ
ඪ •APIΛಈ͔͢ϋʔυϧΛԼ͕Δ͜ͱ •LangChainͷརͱ༻ํ๏ʹؔ͢ΔཧղΛਂΊΔ͜ͱ •LangChainΛར༻ͨ͠LLMͷΞϓϦέʔγϣϯެ։ͷݟ ΛਂΊΔ͜ͱ 85 ຊొஃͷඪʢ࠶ܝʣ
ηογϣϯΞϯέʔτ DAY2 86 https://forms.gle/Upi2i5PsMTEUyJ6F8 ຬ্ҐͷηογϣϯΛޙϒϩάͰެ։༧ఆʂ ճͷ͝ڠྗΛΑΖ͓͘͠ئ͍͠·͢ɻ
None