SlideShare a Scribd company logo
DotNetCode.IT
Microsoft .Net Coding Community
www.dotnetcode.it
MeetUp! #AperiTech
DotNetCode.IT
Microsoft .Net Coding Community
A.I. Bot & Azure Functions
Benvenuti
DotNetCode.IT
Microsoft .Net Coding Community
DotNetCode.IT
Microsoft .Net Coding Community
#AperiTech
DotNetCode.IT
Microsoft .Net Coding Community
Speaker
Senior Developer
Altitudo
Leonardo D’Ottavi
DotNetCode.IT
Microsoft .Net Coding Community
AGENDA
• Perché un bot
• Luis.ai
• Cosa è un bot
• Azure Function
• Abbelliamo il nostro BOT
DotNetCode.IT
Microsoft .Net Coding Community
Perché un bot
www.dotnetcode.it
DotNetCode.IT
Microsoft .Net Coding Community
Dieci anni fa è cambiato tutto
Il 7 Gennaio 2007 veniva lanciato il primo
iphone. (un fallimento commerciale secondo
bloomberg)
Da allora, non rimporta se ci occupiamo di
applicazioni mobile o piattaforme enterprise ,
quel modello di user experience è diventato lo
standard per gli utenti.
DotNetCode.IT
Microsoft .Net Coding Community
App universali
Da quando le App per i cellulari sono diventate un fenomeno
di massa la chimera di tutti i produttori di software e dei
programmatori pigri è stato scrivere codice una volta sola che
potesse andare bene sempre
DotNetCode.IT
Microsoft .Net Coding Community
Un’app per ogni cosa
Migliaia di programmatori, me compreso, si sono dilettati a
fare app semplicissime, brutte a piacere, solo per il gusto di
pubblicare qualche cosa
• Un modo rapido per creare tonnellate di spazzatura sui
vari store ed app che nessuno userà mai
DotNetCode.IT
Fulgido esempio di spazzatura
www.dotnetcode.it
DotNetCode.IT
Microsoft .Net Coding Community
Luis (Language Understanding service)
www.dotnetcode.it
DotNetCode.IT
Cosa è luis
Luis è un servizio che prende in ingresso una query in
linguaggio naturale (utterance) e restituisce un intent
E’ Raggiungibile attraverso una chiamata REST
www.dotnetcode.it
DotNetCode.IT
Microsoft .Net Coding Community
Intent + utterance
Intent:
E 'una frase in linguaggio naturale che può o
meno essere tradotta in un intent
«prepara il caffè»
Utterance
È un comando elaborato sulla base di un
utterance
Make.coffee
Luis prepara il caffè
DotNetCode.IT
Microsoft .Net Coding Community
Phrase list
Sono delle parole intercambiabili che servono a
semplificare la vita a chi scrive il modello
Ad esempio questi sono sinonimi
«caffè» «espresso» «nero»
DotNetCode.IT
Microsoft .Net Coding Community
Entity
Sono dei parametri delle utterance (e degli
intent)
Ad esempio
«Prepara un caffè»
«prepara due caffè»
Sono sintetizzabili in
«prepara [coffeenumber] caffè»
DotNetCode.IT
Microsoft .Net Coding Community
DEMO
DotNetCode.IT
Microsoft .Net Coding Community
Cosa è un bot
www.dotnetcode.it
DotNetCode.IT
Microsoft .Net Coding Community
What is a bot?
{ Your Code }
Direct Line Protocol
REST Endpoint
DotNetCode.IT
Microsoft .Net Coding Community
• Tools for building REST websites
• Services to enrich
• Mechanisms for receive events
• Data to debug and tools to analyze
• Implements standard protocols
• Modeling conversations is hard; tools help!
• UI across multiple canvases is hard; cards rock!
• Language understanding is hard
• Common and well understood patterns
• Start simple; add complexity; no dead-ends
• Bot adapts to the user, based on context
• Composable and intelligent controls to manage complexity
What is the bot framework?
C#
DotNetCode.IT
Microsoft .Net Coding Community
Strumenti utili
Portale Developer bot framework
https://dev.botframework.com
Azure portal
https://portal.azure.com
Bot emulator
https://aka.ms/botemulator
Ngrok (non necessario ma utile)
https://ngrok.com/
Bot builder template
https://marketplace.visualstudio.com/items?itemName=BotBuilder.BotBuilderV3
DotNetCode.IT
Microsoft .Net Coding Community
Creare un bot
• CreazioneBot channel
registration
• Creazione app id e secret
• Connessione con i canali
Azure
• Creazione del template
del bot
• Collegare app id e secret
Your code • Test su emulatore
• Deploy su azure
Run
DotNetCode.IT
Microsoft .Net Coding Community
DEMO
Più facile a farsi
www.dotnetcode.it
DotNetCode.IT
Microsoft .Net Coding Community
Azure Function
www.dotnetcode.it
DotNetCode.IT
Microsoft .Net Coding Community
La cosa più importante è spiegare il logo
DotNetCode.IT
Microsoft .Net Coding Community
Sono l’unità più piccola di
elaborazione di azure
• Sono la soluzione più semplice per eseguire
piccoli pezzi di codice nel cloud
• Scrivi solo il pezzo di codice che ti serve per
risolvere il problema senza preoccuparti
dell’infrastruttura
www.dotnetcode.it
DotNetCode.IT
Microsoft .Net Coding Community
Principali vantaggi di Azure
function
• Potete usare qualsiasi linguaggio
• Non vi preoccupate dell’infrastruttura
• Pagate solo quello che usate
• Non vi dovete occupare della scalabilità
www.dotnetcode.it
DotNetCode.IT
Microsoft .Net Coding Community
Bot ed azure function
Il template è bello ma possiamo fare la stessa cosa in maniera
più economica con una azure function
• Aggiungere il pacchetto nuget: Microsoft.Bot.Builder.Azure
• Creare il corpo della funzione corretto
https://gist.github.com/sely2k/753e45773774db36757c448450
795be6
www.dotnetcode.it
DotNetCode.IT
Microsoft .Net Coding Community
DEMO
DotNetCode.IT
Microsoft .Net Coding Community
Più bello e più intelligente
www.dotnetcode.it
DotNetCode.IT
Microsoft .Net Coding Community
Servizi cognitivi di azure
• Visione Artificiale
• Conoscenza
• Linguaggio
• Sintesi vocale
• Ricerca
DotNetCode.IT
Microsoft .Net Coding Community
Aggingere luis
Per aggiungere Luis ad una dialog basta decorare la propria classe in maniera opportuna
DotNetCode.IT
Microsoft .Net Coding Community
Card
Alcuni canali supportano l’invio di messaggi complessi che
contengono grafica ed azioni.
Questi messaggi complessi sono detti Card
www.dotnetcode.it
DotNetCode.IT
Microsoft .Net Coding Community
Esistono vari tipi di Card
Adaptive Card A customizable card that can contain any combination of text, speech, images, buttons, and
input fields. See per-channel support.
Animation Card A card that can play animated GIFs or short videos.
Audio Card A card that can play an audio file.
Hero Card A card that typically contains a single large image, one or more buttons, and text.
Thumbnail Card A card that typically contains a single thumbnail image, one or more buttons, and text.
Receipt Card A card that enables a bot to provide a receipt to the user. It typically contains the list of items
to include on the receipt, tax and total information, and other text.
Signin Card A card that enables a bot to request that a user sign-in. It typically contains text and one or
more buttons that the user can click to initiate the sign-in process.
Video Card A card that can play videos.
DotNetCode.IT
Microsoft .Net Coding Community
DEMO
www.dotnetcode.it
DotNetCode.IT
Microsoft .Net Coding Community
DotNetCode.IT
Microsoft .Net Coding Community
DotNetCode.IT
Microsoft .Net Coding Community
Prossimo Evento
Data: 21/06/2018
Blazor ...
DotNetCode.IT
Microsoft .Net Coding Community
Selfie Lottery
www.dotnetcode.it
http://bit.ly/sldnc20180518
DotNetCode.IT
Microsoft .Net Coding Community
Grazie a Tutti!
DotNetCode.IT
Microsoft .Net Coding Community
DotNetCode.IT
Microsoft .Net Coding Community
Follow US!
www.dotnetcode.it
https://www.facebook.com/DotNetCode.IT
https://twitter.com/DotNetCodeIT
https://plus.google.com/+DotnetcodeIt

More Related Content

PDF
Microsoft Fast - Overview
PPTX
2015.04.23 Azure Community Bootcamp 2015 Keynote Italy
PDF
[Alam aeki] Guida illustrata alla modellazione di un dominio con Event Sourci...
PPTX
Sviluppo di soluzioni embedded moderne con .NET Micro Framework by Lorenzo Ma...
PDF
Presentazione aziendale BBC Technologies 2021
PDF
Wasm and Blazor CDays keynote
PPTX
Intelligenza artificiale nel mondo front-end - CodeGen2021
PPTX
COSTRUISCI IL TUO DEVICE
Microsoft Fast - Overview
2015.04.23 Azure Community Bootcamp 2015 Keynote Italy
[Alam aeki] Guida illustrata alla modellazione di un dominio con Event Sourci...
Sviluppo di soluzioni embedded moderne con .NET Micro Framework by Lorenzo Ma...
Presentazione aziendale BBC Technologies 2021
Wasm and Blazor CDays keynote
Intelligenza artificiale nel mondo front-end - CodeGen2021
COSTRUISCI IL TUO DEVICE

What's hot (20)

PPTX
APPSTUDIO: DA ZERO ALLO STORE IN 50 MINUTI!
PPTX
Christmas greetings cards with blazor
PDF
ARCHITETTURA DI UN'APPLICAZIONE SCALABILE
PPTX
UI Composition - Prism
PPTX
.NET Core, ASP.NET Core e Linux per il Mobile
PPTX
Mob01 mobile services e webapi
PPTX
Akka.net & Actor Model
PDF
Blazor: are we ready for the launch?
PPTX
Sviluppare Azure Web Apps
PPTX
Windows azure - abbattere tempi e costi di sviluppo
PPTX
Real Time Monitoring and Analitycs : Customer Experience in Production
PPTX
Slide typescript - net campus
PPTX
ASP.NET AND Azure Function
PDF
Introduzione a Service Fabric e Actor Model
PPTX
Azure functions deep dive - Giorgio Di Nardo - Codemotion Rome 2017
PPTX
Del furia signalr-to-the-max
PPTX
Costruisci il tuo device
PDF
Progettare in Team per il Responsive Web Design
PDF
ASP.NET Core - dove siamo arrivati
PDF
Training Signal Webtrends
APPSTUDIO: DA ZERO ALLO STORE IN 50 MINUTI!
Christmas greetings cards with blazor
ARCHITETTURA DI UN'APPLICAZIONE SCALABILE
UI Composition - Prism
.NET Core, ASP.NET Core e Linux per il Mobile
Mob01 mobile services e webapi
Akka.net & Actor Model
Blazor: are we ready for the launch?
Sviluppare Azure Web Apps
Windows azure - abbattere tempi e costi di sviluppo
Real Time Monitoring and Analitycs : Customer Experience in Production
Slide typescript - net campus
ASP.NET AND Azure Function
Introduzione a Service Fabric e Actor Model
Azure functions deep dive - Giorgio Di Nardo - Codemotion Rome 2017
Del furia signalr-to-the-max
Costruisci il tuo device
Progettare in Team per il Responsive Web Design
ASP.NET Core - dove siamo arrivati
Training Signal Webtrends
Ad

Similar to Meetup DotNetCode A.I. Bot Framework and Azure Functions (20)

PDF
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023
PDF
Meetup Azure DevOps
PDF
Meetup Azure DevOps
PPT
NEXiDA Smart User Interface flyer (italian)
PPTX
Win04 windows 8 e windows phone 8 - interfacciamoci
PDF
Web service persino nei sistemi embedeed
PPTX
2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...
PDF
Develer - Qt Embedded - Introduzione
PDF
Develer - Qt Embedded - Intro
PPTX
Angular e asp.net core: un framework sul framework
PPTX
Power BI Streaming Data Flow e Azure IoT Central
PDF
Exploring VS Code
PDF
Cloud & No-Coding: come fare su Azure?
PDF
Cosa è un servizio digitale?
PDF
Realizzazione di un ChatBot sulla piattaforma Messenger di Facebook per l'inf...
PPTX
SAL 2018 - Ditech-News
PDF
Meetup DotNetCode Settembre 2018 - ASP.NET Core 2.1
PPTX
Power BI Streaming Data Flow e Azure IoT Central
PPTX
Meetup Fluent Design e Progressive Web App
PDF
XMASDEV 2018 - XMAS GIFT ASSISTANT
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023
Meetup Azure DevOps
Meetup Azure DevOps
NEXiDA Smart User Interface flyer (italian)
Win04 windows 8 e windows phone 8 - interfacciamoci
Web service persino nei sistemi embedeed
2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...
Develer - Qt Embedded - Introduzione
Develer - Qt Embedded - Intro
Angular e asp.net core: un framework sul framework
Power BI Streaming Data Flow e Azure IoT Central
Exploring VS Code
Cloud & No-Coding: come fare su Azure?
Cosa è un servizio digitale?
Realizzazione di un ChatBot sulla piattaforma Messenger di Facebook per l'inf...
SAL 2018 - Ditech-News
Meetup DotNetCode Settembre 2018 - ASP.NET Core 2.1
Power BI Streaming Data Flow e Azure IoT Central
Meetup Fluent Design e Progressive Web App
XMASDEV 2018 - XMAS GIFT ASSISTANT
Ad

More from dotnetcode (14)

PDF
Azure Meetup: Novità CosmosDB modalità Serverless e Cognitive Services
PDF
Azure Meetup: Understanding Azure App Service Plan
PDF
Azure Meetup: Keep your secrets and configurations safe in azure!
PDF
Azure Meetup: Azure Storage/Datalake Deep Dive
PDF
Meetup Progressive Web App
PDF
Meetup ASP.NET Core e Kubernetes
PDF
How to create custom modules for Visual Studio
PDF
Meetup ASP.NET Core 2 e Docker
PDF
Meetup DotNetCode Owasp
PPTX
Meetup .NET & Micro ORM
PPTX
Meetup ASP.NET Core Angular
PPTX
Webhooks Meetup
PPTX
Meetup DotNetCode Dependency Injection
PPTX
Presentazione DotNetSchool
Azure Meetup: Novità CosmosDB modalità Serverless e Cognitive Services
Azure Meetup: Understanding Azure App Service Plan
Azure Meetup: Keep your secrets and configurations safe in azure!
Azure Meetup: Azure Storage/Datalake Deep Dive
Meetup Progressive Web App
Meetup ASP.NET Core e Kubernetes
How to create custom modules for Visual Studio
Meetup ASP.NET Core 2 e Docker
Meetup DotNetCode Owasp
Meetup .NET & Micro ORM
Meetup ASP.NET Core Angular
Webhooks Meetup
Meetup DotNetCode Dependency Injection
Presentazione DotNetSchool

Meetup DotNetCode A.I. Bot Framework and Azure Functions

  • 1. DotNetCode.IT Microsoft .Net Coding Community www.dotnetcode.it MeetUp! #AperiTech
  • 2. DotNetCode.IT Microsoft .Net Coding Community A.I. Bot & Azure Functions Benvenuti DotNetCode.IT Microsoft .Net Coding Community
  • 3. DotNetCode.IT Microsoft .Net Coding Community #AperiTech
  • 4. DotNetCode.IT Microsoft .Net Coding Community Speaker Senior Developer Altitudo Leonardo D’Ottavi
  • 5. DotNetCode.IT Microsoft .Net Coding Community AGENDA • Perché un bot • Luis.ai • Cosa è un bot • Azure Function • Abbelliamo il nostro BOT
  • 6. DotNetCode.IT Microsoft .Net Coding Community Perché un bot www.dotnetcode.it
  • 7. DotNetCode.IT Microsoft .Net Coding Community Dieci anni fa è cambiato tutto Il 7 Gennaio 2007 veniva lanciato il primo iphone. (un fallimento commerciale secondo bloomberg) Da allora, non rimporta se ci occupiamo di applicazioni mobile o piattaforme enterprise , quel modello di user experience è diventato lo standard per gli utenti.
  • 8. DotNetCode.IT Microsoft .Net Coding Community App universali Da quando le App per i cellulari sono diventate un fenomeno di massa la chimera di tutti i produttori di software e dei programmatori pigri è stato scrivere codice una volta sola che potesse andare bene sempre
  • 9. DotNetCode.IT Microsoft .Net Coding Community Un’app per ogni cosa Migliaia di programmatori, me compreso, si sono dilettati a fare app semplicissime, brutte a piacere, solo per il gusto di pubblicare qualche cosa • Un modo rapido per creare tonnellate di spazzatura sui vari store ed app che nessuno userà mai
  • 10. DotNetCode.IT Fulgido esempio di spazzatura www.dotnetcode.it
  • 11. DotNetCode.IT Microsoft .Net Coding Community Luis (Language Understanding service) www.dotnetcode.it
  • 12. DotNetCode.IT Cosa è luis Luis è un servizio che prende in ingresso una query in linguaggio naturale (utterance) e restituisce un intent E’ Raggiungibile attraverso una chiamata REST www.dotnetcode.it
  • 13. DotNetCode.IT Microsoft .Net Coding Community Intent + utterance Intent: E 'una frase in linguaggio naturale che può o meno essere tradotta in un intent «prepara il caffè» Utterance È un comando elaborato sulla base di un utterance Make.coffee Luis prepara il caffè
  • 14. DotNetCode.IT Microsoft .Net Coding Community Phrase list Sono delle parole intercambiabili che servono a semplificare la vita a chi scrive il modello Ad esempio questi sono sinonimi «caffè» «espresso» «nero»
  • 15. DotNetCode.IT Microsoft .Net Coding Community Entity Sono dei parametri delle utterance (e degli intent) Ad esempio «Prepara un caffè» «prepara due caffè» Sono sintetizzabili in «prepara [coffeenumber] caffè»
  • 17. DotNetCode.IT Microsoft .Net Coding Community Cosa è un bot www.dotnetcode.it
  • 18. DotNetCode.IT Microsoft .Net Coding Community What is a bot? { Your Code } Direct Line Protocol REST Endpoint
  • 19. DotNetCode.IT Microsoft .Net Coding Community • Tools for building REST websites • Services to enrich • Mechanisms for receive events • Data to debug and tools to analyze • Implements standard protocols • Modeling conversations is hard; tools help! • UI across multiple canvases is hard; cards rock! • Language understanding is hard • Common and well understood patterns • Start simple; add complexity; no dead-ends • Bot adapts to the user, based on context • Composable and intelligent controls to manage complexity What is the bot framework? C#
  • 20. DotNetCode.IT Microsoft .Net Coding Community Strumenti utili Portale Developer bot framework https://dev.botframework.com Azure portal https://portal.azure.com Bot emulator https://aka.ms/botemulator Ngrok (non necessario ma utile) https://ngrok.com/ Bot builder template https://marketplace.visualstudio.com/items?itemName=BotBuilder.BotBuilderV3
  • 21. DotNetCode.IT Microsoft .Net Coding Community Creare un bot • CreazioneBot channel registration • Creazione app id e secret • Connessione con i canali Azure • Creazione del template del bot • Collegare app id e secret Your code • Test su emulatore • Deploy su azure Run
  • 22. DotNetCode.IT Microsoft .Net Coding Community DEMO Più facile a farsi www.dotnetcode.it
  • 23. DotNetCode.IT Microsoft .Net Coding Community Azure Function www.dotnetcode.it
  • 24. DotNetCode.IT Microsoft .Net Coding Community La cosa più importante è spiegare il logo
  • 25. DotNetCode.IT Microsoft .Net Coding Community Sono l’unità più piccola di elaborazione di azure • Sono la soluzione più semplice per eseguire piccoli pezzi di codice nel cloud • Scrivi solo il pezzo di codice che ti serve per risolvere il problema senza preoccuparti dell’infrastruttura www.dotnetcode.it
  • 26. DotNetCode.IT Microsoft .Net Coding Community Principali vantaggi di Azure function • Potete usare qualsiasi linguaggio • Non vi preoccupate dell’infrastruttura • Pagate solo quello che usate • Non vi dovete occupare della scalabilità www.dotnetcode.it
  • 27. DotNetCode.IT Microsoft .Net Coding Community Bot ed azure function Il template è bello ma possiamo fare la stessa cosa in maniera più economica con una azure function • Aggiungere il pacchetto nuget: Microsoft.Bot.Builder.Azure • Creare il corpo della funzione corretto https://gist.github.com/sely2k/753e45773774db36757c448450 795be6 www.dotnetcode.it
  • 29. DotNetCode.IT Microsoft .Net Coding Community Più bello e più intelligente www.dotnetcode.it
  • 30. DotNetCode.IT Microsoft .Net Coding Community Servizi cognitivi di azure • Visione Artificiale • Conoscenza • Linguaggio • Sintesi vocale • Ricerca
  • 31. DotNetCode.IT Microsoft .Net Coding Community Aggingere luis Per aggiungere Luis ad una dialog basta decorare la propria classe in maniera opportuna
  • 32. DotNetCode.IT Microsoft .Net Coding Community Card Alcuni canali supportano l’invio di messaggi complessi che contengono grafica ed azioni. Questi messaggi complessi sono detti Card www.dotnetcode.it
  • 33. DotNetCode.IT Microsoft .Net Coding Community Esistono vari tipi di Card Adaptive Card A customizable card that can contain any combination of text, speech, images, buttons, and input fields. See per-channel support. Animation Card A card that can play animated GIFs or short videos. Audio Card A card that can play an audio file. Hero Card A card that typically contains a single large image, one or more buttons, and text. Thumbnail Card A card that typically contains a single thumbnail image, one or more buttons, and text. Receipt Card A card that enables a bot to provide a receipt to the user. It typically contains the list of items to include on the receipt, tax and total information, and other text. Signin Card A card that enables a bot to request that a user sign-in. It typically contains text and one or more buttons that the user can click to initiate the sign-in process. Video Card A card that can play videos.
  • 34. DotNetCode.IT Microsoft .Net Coding Community DEMO www.dotnetcode.it
  • 35. DotNetCode.IT Microsoft .Net Coding Community DotNetCode.IT Microsoft .Net Coding Community
  • 36. DotNetCode.IT Microsoft .Net Coding Community Prossimo Evento Data: 21/06/2018 Blazor ...
  • 37. DotNetCode.IT Microsoft .Net Coding Community Selfie Lottery www.dotnetcode.it http://bit.ly/sldnc20180518
  • 38. DotNetCode.IT Microsoft .Net Coding Community Grazie a Tutti! DotNetCode.IT Microsoft .Net Coding Community
  • 39. DotNetCode.IT Microsoft .Net Coding Community Follow US! www.dotnetcode.it https://www.facebook.com/DotNetCode.IT https://twitter.com/DotNetCodeIT https://plus.google.com/+DotnetcodeIt