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
OpenAIのAssistants API(Beta)の概要と使い方
takaakikakei
0
340
企業向け生成AIアプリの 開発から得られた知見
takaakikakei
0
490
「AWSによる独自データ活用の生成AIソリューション」というタイトルでCM re:Growth 2023に登壇しました #AWSreInvent #cmregrowth
takaakikakei
0
950
Slack Boltコース!AWS Lambda & Pythonのビキナー仕立て #devio2022
takaakikakei
0
5.2k
AWS Step Functions上でエラーが発生した場合の効果的な通知方法を検討してみた
takaakikakei
0
7.2k
Other Decks in Technology
See All in Technology
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
130
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
370
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
390
DynamoDB でスロットリングが発生したとき_大盛りver/when_throttling_occurs_in_dynamodb_long
emiki
1
420
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
410
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
180
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.4k
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
120
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
1
110
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Optimizing for Happiness
mojombo
376
70k
Designing the Hi-DPI Web
ddemaree
280
34k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
RailsConf 2023
tenderlove
29
900
YesSQL, Process and Tooling at Scale
rocio
169
14k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
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