SRE ã®ç°ä¸ @kenzo0107 ã§ãã
社å ç ChatGPT ãæ§ç¯ãã社å ã® ChatGPT å©ç¨ãä¿é²ãã話ã§ãã
社å ç ChatGPT ãå¿ è¦ã ã£ãçç±
以ä¸è¦æãå®ç¾ããçºã§ãã
- ç§å¿æ å ±ãã¯ãã¼ãºããªç°å¢ã§ OpenAI ã«ãã¹ãããã
- 社å¡èª°ããææ°ã®ã¢ãã«ããã¼ã¸ã§ã³ã§é«ç²¾åº¦ãä¸ã¤ãããã©ã¼ãã³ã¹ã®é«ã ChatGPT ãå©ç¨ããã
æ§æ - Web ç 社å ChatGPT
- Web ãµã¼ãã¹ã¯ AWS ã«é ç½®
- ALB ãä¼ç¤¾æ¯ã«åã㦠Google èªè¨¼ãã *1
- ECS ãã Azure API Management çµç±ã§ Azure OpenAI Service ã«åãåãã
- API Management 㯠Azure OpenAI Service ã®ç£æ»ãã°ãåå¾ããçºã«é ç½®ãã¦ãã *2
- Azure å´ã§ã¯ãããã¯ã¼ã¯ã»ãã¥ãªãã£ã°ã«ã¼ã㧠AWS NAT Gateway ã® EIP ã許å¯ãããªã¯ã¨ã¹ãå¶éãã
AWS ã«ãµã¼ããç«ã¦ã¦ããçç±
Azure ã§å®çµããæ¹ããããã¯ãã¼ãºãã§ã»ãã¥ã¢ã§ãã
å¼ç¤¾ã§ã¯ AWS ã¯ã»ãã¥ãªãã£ã¬ã¼ãã¬ã¼ã«ãæ´åããã¦ãã¾ãã
Azure ã¯æªå®ã§ãã
ãã®çºãAzure å´ã¯å¿
è¦æä½éã®å©ç¨ãªã½ã¼ã¹ã®ã¿ã«ã
AWS å´ã§åºæ¬ Web ãµã¼ãã¹ãé
ä¿¡ããæ§æã¨ãã¾ããã
chatbot ã®é¸å®
æ¢ã«ä¸ã®ä¸ã«ã¯å¤ãã® OSS ãããã¾ããã ä¸ã§ãã³ã³ããã«å¯¾å¿ãã¦ãããã¹ã¿ã¼æ°ãå¤ããéçºãæ´»çºã ã£ã mckaywrigley/chatbot-ui *3 ãæ¡ç¨ãã¾ããã
chatbot-ui v2 ããªãªã¼ã¹ããã¦ãã¾ããã v1 ãå©ç¨ãã¦ãã¾ãã*4
chatbot-ui v2 æ¡ç¨ãè¦éã£ãçç±
- supabase ã¨ã®é£æºãåæã¨ãã¦ãã
- AWS ä¸ã«ã¯ãã¼ãºããªç°å¢ãæ§ç¯ãããããªã¢ã¼ããã¯ãã£ãæ¡ç¨ã§ããªã
- å©ç¨è ãåèª Azure OpenAI Service ããã㤠ID ãè¨å®ã»ç®¡çããå¿ è¦ããã
ä¸è¨çç±ããæ¡ç¨ãè¦éãã¾ããã
chatbot-ui v1 ã®åé¡ç¹
v1 ã¯åèªè¨å®ä¸è¦ã§å³å©ç¨ã§ããã¡ãªããããããã®ã®ã以ä¸ãã¡ãªãããããã¾ããã
- API ãã¼ã¸ã§ã³ã 2023-03-15-preview ããã¢ããã°ã¬ã¼ãããã¨ã¨ã©ã¼ã«ãªã
- Azure OpenAI Service ããã®ã¬ã¹ãã³ã¹ãéåãã
- fetch ã¡ã½ãã㧠API ã¨ã³ããã¤ã³ãããã¬ã¹ãã³ã¹ãåå¾ãã¦ãããã¨ãå½±é¿ãã¦ãã
ä¸è¨ã¯ãããã openai ã©ã¤ãã©ãªãå©ç¨ãããã¨ã§è§£æ±ºã§ãã¾ããã*5
Slack ããåãåããããï¼
社å ãªãªã¼ã¹ãã Google Analytics ã§å©ç¨è ã®å¢å ãçºããªããä¸å¼å¸ããã®ãæã®éã ãããã¾ä»¥ä¸ã®æè¦ãããã ãã¾ããã
- VPN ã«ç¹ã㧠Web ãã©ã¦ã¶éãã®ãæé
- Slack ãããµã¯ãã¨åãåãããã
æ©éå®ç¾ã«åãåãã¾ããã
æ§æ - Slack ç 社å ChatGPT
- Slack Event Subscription ãè¨å®ãã Bot ã¸ã®ã¡ã³ã·ã§ã³ã»Direct Message ãããªã¬ã¼ã« Lambda ãèµ·åã Azure OpenAI Service ã¸åãåããã
- å¼ç¤¾ã°ã«ã¼ãä¼ç¤¾æ¯ã®å Slack Workspace 㧠Slack App ãä½æ*6
- Slack æ¯ã® Signing Secret ã Bot User OAuth Token 㯠Lambda å ã§å¦çåã *7
- VPC ã¢ã¼ãã® Lambda ãã Azure OpenAI Service ã«åãåããã
- åºå£ IP ã NAT Gateway EIP ã«åºå®ããçº
Slack åå ã¡ã³ãã¼ã¯ã°ã«ã¼ãä¼ç¤¾ã®ã¡ã¼ã«ã¢ã«ã¦ã³ããææãã¦ãããGoogle èªè¨¼ã¯ããªãæ¹éã¨ãã¾ããã
使ç¨ä¾1: ãã£ã³ãã«ä¸ãã Slack App ã«ã¡ã³ã·ã§ã³ãã
Slack Bot ããã£ã³ãã«ã«æå¾ ãã Bot ã¸ã®ã¡ã³ã·ã§ã³ãããªã¬ã¼ã« Azure OpenAI Service ã«åãåããã¾ãã
ã¹ã¬ããä¸ã® Bot ã¸ã®ã¡ã³ã·ã§ã³ã¯ Azure OpenAI Service ã¨ã®ä¼è©±ã«å¼ãç¶ããã¾ãã*8
使ç¨ä¾2: Slack App ã«ç´æ¥ Direct Message ãéä¿¡ãã
ãã£ã³ãã«ä¸ã§ã¡ã³ã·ã§ã³ããå ´åã¨ç°ãªããã¹ã¬ããä¸ã®å ¨ã¦ã Azure OpenAI Service ã¨ã®ä¼è©±ã¨ãªãã¾ãã
å©ç¨ä¸ã®æ³¨æç¹ã社å éç¥
- ç§å¿æ
å ±ãæ±ãé㯠Slack ã§ãªã Web çãå©ç¨ãã¦ããã ã
- Slack ã¯ãµã¼ããã¼ãã£ã§ãããç§å¿æ å ±ã第ä¸è ãåå¾ã§ãã¦ãã¾ãå¯è½æ§ãããçº
- Slack æ¤ç´¢æã®
@office-ai
ã®ãã¤ãºé¤å¤ãããæã¯-from:@office-ai
ãã¦ãã¨ãããã¦ãã¦ã®éé*9
ç·è©
Slack çã¯ãä»ã®æ¹ã Azure OpenAI Service ã«ã©ã®ããã«åãåããããã¨ã§åçãå¼ãåºããã®ãã¦ãã¦ãç¥ãæ©ä¼ãä½ããã¨ãã§ããã¨æãã¾ãã
éçºã«éãã¦ã
Azure é¢é£ã®ã»ãã¥ãªãã£ã OSS ã®æ¹ä¿®çã諸åé¡ã«å¯¾ãã¦ã
Azure OpenAI Service ãå©ç¨ãããã¨ã§è§£æ±ºã§ãã¾ããã
å¼ç¤¾ã§ã¯ GitHub Copilot *10 ãæ¡ç¨ãçç£æ§ãåä¸ãã¦ããã㨠AI ã«ãã社å å ¨ä½ã®æ¥åä¿é²ããçºã« AI ãå©ç¨ããã¨ãã好循ç°ãã§ãã¦ããããã«æ¹ãã¦æãã¾ããã
以ä¸
åèã«ãªãã°å¹¸ãã§ãã
æ¯éèªè ã«ãªã£ã¦ãã ãã
ã¡ããã¢ã§ã¯ä¸ç·ã«åã仲éãåéãã¦ãã¾ãã ãå¿åããå¾ ã¡ãã¦ããã¾ãï¼
â åéãã¸ã·ã§ã³ã¯ãã¡ã medpeer.co.jp
â ã¨ã³ã¸ãã¢ç´¹ä»ãã¼ã¸ã¯ãã¡ã engineer.medpeer.co.jp
â ã¡ããã¢å ¬å¼YouTubeã www.youtube.com
â ã¡ããã¢å
¬å¼note
style.medpeer.co.jp
*1:ALB ã®ãªã¹ãã¼ã«ã¼ã«ã®ããã©ã«ãã¢ã¯ã·ã§ã³ã§ã®ã¿ Google èªè¨¼ã®æå®ãå¯è½ã§ããã¡ããã¢æ ªå¼ä¼ç¤¾ã¡ã³ãã¼ãæ㤠@medpeer.co.jp ã®ã¡ã¼ã«ã¢ã«ã¦ã³ãã¨ãã£ãããã©ã¹æ ªå¼ä¼ç¤¾ã¡ã³ãã¼ãæ㤠@fitsplus.co.jp 㧠Google Workspace ãç°ãªãçºã Google Workspace æ¯ã« ALB ãç¨æãããã¨ã¨ãã¾ããã
*2:Azure OpenAI Service åç¬ã§ã¯ Azure OpenAI Service ã¸ã®ãªã¯ã¨ã¹ãã»ã¬ã¹ãã³ã¹ã®ãã°ã¯åå¾ã§ããªãä»æ§ã§ããã learn.microsoft.com
*3:Next.js ãã¼ã¹ã§ä½æããã¦ãã¾ã
*4:legacy ãã©ã³ãã v1 ç¸å½ã§ã
*5:v2 ã®åç §å®è£ ã§äºãªããå¾ã¾ããã
*6:workspace ãè·¨ãã Slack Bot ãä½ãã¾ããã§ãã
*7:Event Subscription ã§æå®ããã¨ã³ããã¤ã³ãã« "?workspace=medpeer" ã追å ãããã¨ã§å¤å®ãã¾ããã
*8:Bot ã«ã¡ã³ã·ã§ã³ãã¦ããªãã¡ãã»ã¼ã¸ã¯ Slack Event Subscription ãããªã¬ã¼ã§ããªãçº
*9:ç¨éããããã¨æã£ãã®ã§
*10:Copilot Business ãå°å ¥ãã¦ãã¾ã