Upgrade to Pro — share decks privately, control downloads, hide ads and more …

用 Python + Azure 建立你的聊天機器人

Andy Dai
August 27, 2016

用 Python + Azure 建立你的聊天機器人

Andy Dai

August 27, 2016
Tweet

More Decks by Andy Dai

Other Decks in Programming

Transcript

  1. ᛔ౯Օ奧 • Andy Dai • Organizer of Taipei.py • PyCon

    பૡ (2012~) • 犋䨝狶獮ᒒጱૡ纷䒍 @GliaCloud 2
  2. 4

  3. CHATBOT 礍䯤墋Օ ChatBot Interface Web Service Business Logic Natural Language

    Understanding User Status External Service THE CORE OF YOUR BOT 9
  4. BotBuilder SDK • BotFramework ChatBot Interface Web Service Business Logic

    Natural Language Understanding User Status External Service • LUIS (Language Understanding Intelligence Service) 11
  5. Why Python? • Daily Job - ෈ਁ蒂ቘ牏CSV/XLS牏粖翕殷 • Web -

    Django, Flask • DevOps - Ansible, SaltStack, OpenStack • Ӟ犚盄ᄤጱԪ眐 (Deep Learning, Machine Learning, Natural Language Processing, …) • 螭磪ๅग़䛑አ (Raspberry Pi, ᇔቘ秇硈, 䌃 APP ) 15
  6. 19

  7. 20

  8. Authentication import requests def get_token(client_id, client_secret): payload = { 'grant_type':

    "client_credentials", 'client_id': client_id, 'client_secret': client_secret, 'scope': "https://graph.microsoft.com/.default", } response = requests.post(AUTH_URL, data=payload) token = response.json()['access_token'] return token 24
  9. THANK YOU [email protected] / 886 2 2752 8851 Unit.3, 11F.,

    No.48, Fuxing N.Rd., Zhongshan Dist., Taipei City 104, Taiwan