SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

APPSTUDIO: DA ZERO ALLO STORE IN 50 MINUTI!
APPSTUDIO: DA ZERO ALLO STORE IN 50 MINUTI!APPSTUDIO: DA ZERO ALLO STORE IN 50 MINUTI!
APPSTUDIO: DA ZERO ALLO STORE IN 50 MINUTI!DotNetCampus
 
Christmas greetings cards with blazor
Christmas greetings cards with blazorChristmas greetings cards with blazor
Christmas greetings cards with blazorNicolò Carandini
 
ARCHITETTURA DI UN'APPLICAZIONE SCALABILE
ARCHITETTURA DI UN'APPLICAZIONE SCALABILEARCHITETTURA DI UN'APPLICAZIONE SCALABILE
ARCHITETTURA DI UN'APPLICAZIONE SCALABILEDotNetCampus
 
UI Composition - Prism
UI Composition - PrismUI Composition - Prism
UI Composition - PrismDotNetMarche
 
.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il Mobile.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il MobilePietro Libro
 
Mob01 mobile services e webapi
Mob01   mobile services e webapiMob01   mobile services e webapi
Mob01 mobile services e webapiDotNetCampus
 
Blazor: are we ready for the launch?
Blazor: are we ready for the launch?Blazor: are we ready for the launch?
Blazor: are we ready for the launch?Andrea Agnoletto
 
Sviluppare Azure Web Apps
Sviluppare Azure Web AppsSviluppare Azure Web Apps
Sviluppare Azure Web AppsAndrea Dottor
 
Windows azure - abbattere tempi e costi di sviluppo
Windows azure - abbattere tempi e costi di sviluppoWindows azure - abbattere tempi e costi di sviluppo
Windows azure - abbattere tempi e costi di sviluppoAndrea Dottor
 
Real Time Monitoring and Analitycs : Customer Experience in Production
Real Time Monitoring and Analitycs : Customer Experience in ProductionReal Time Monitoring and Analitycs : Customer Experience in Production
Real Time Monitoring and Analitycs : Customer Experience in ProductionCodemotion
 
Slide typescript - net campus
Slide typescript - net campusSlide typescript - net campus
Slide typescript - net campusDotNetCampus
 
ASP.NET AND Azure Function
ASP.NET AND Azure FunctionASP.NET AND Azure Function
ASP.NET AND Azure FunctionLuca Congiu
 
Introduzione a Service Fabric e Actor Model
Introduzione a Service Fabric e Actor ModelIntroduzione a Service Fabric e Actor Model
Introduzione a Service Fabric e Actor ModelAndrea Tosato
 
Azure functions deep dive - Giorgio Di Nardo - Codemotion Rome 2017
Azure functions deep dive - Giorgio Di Nardo - Codemotion Rome 2017Azure functions deep dive - Giorgio Di Nardo - Codemotion Rome 2017
Azure functions deep dive - Giorgio Di Nardo - Codemotion Rome 2017Codemotion
 
Del furia signalr-to-the-max
Del furia   signalr-to-the-maxDel furia   signalr-to-the-max
Del furia signalr-to-the-maxDotNetCampus
 
Costruisci il tuo device
Costruisci il tuo deviceCostruisci il tuo device
Costruisci il tuo deviceDotNetCampus
 
Progettare in Team per il Responsive Web Design
Progettare in Team per il Responsive Web DesignProgettare in Team per il Responsive Web Design
Progettare in Team per il Responsive Web DesignSalvatore Paone
 
ASP.NET Core - dove siamo arrivati
ASP.NET Core - dove siamo arrivatiASP.NET Core - dove siamo arrivati
ASP.NET Core - dove siamo arrivatiAndrea Dottor
 
Training Signal Webtrends
Training Signal WebtrendsTraining Signal Webtrends
Training Signal WebtrendsStefano Iaboni
 

Tendances (20)

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

Similaire à Meetup DotNetCode A.I. Bot Framework and Azure Functions

Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023AndreaStagi3
 
Meetup Azure DevOps
Meetup Azure DevOpsMeetup Azure DevOps
Meetup Azure DevOpsdotnetcode
 
Meetup Azure DevOps
Meetup Azure DevOpsMeetup Azure DevOps
Meetup Azure DevOpsdotnetcode
 
NEXiDA Smart User Interface flyer (italian)
NEXiDA Smart User Interface flyer (italian)NEXiDA Smart User Interface flyer (italian)
NEXiDA Smart User Interface flyer (italian)Claudio Rubbiani
 
Win04 windows 8 e windows phone 8 - interfacciamoci
Win04   windows 8 e windows phone 8 - interfacciamociWin04   windows 8 e windows phone 8 - interfacciamoci
Win04 windows 8 e windows phone 8 - interfacciamociDotNetCampus
 
Web service persino nei sistemi embedeed
Web service persino nei sistemi embedeedWeb service persino nei sistemi embedeed
Web service persino nei sistemi embedeedAntonio Cafiero
 
2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...
2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...
2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...Marco Parenzan
 
Develer - Qt Embedded - Introduzione
Develer - Qt Embedded - Introduzione Develer - Qt Embedded - Introduzione
Develer - Qt Embedded - Introduzione Develer S.r.l.
 
Angular e asp.net core: un framework sul framework
Angular e asp.net core: un framework sul frameworkAngular e asp.net core: un framework sul framework
Angular e asp.net core: un framework sul frameworkMichele Aponte
 
Power BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT Central Power BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT Central Marco Parenzan
 
Exploring VS Code
Exploring VS CodeExploring VS Code
Exploring VS Codedotnetcode
 
Cloud & No-Coding: come fare su Azure?
Cloud & No-Coding: come fare su Azure?Cloud & No-Coding: come fare su Azure?
Cloud & No-Coding: come fare su Azure?Andrea Carratta
 
Cosa è un servizio digitale?
Cosa è un servizio digitale?Cosa è un servizio digitale?
Cosa è un servizio digitale?Metooo
 
Realizzazione di un ChatBot sulla piattaforma Messenger di Facebook per l'inf...
Realizzazione di un ChatBot sulla piattaforma Messenger di Facebook per l'inf...Realizzazione di un ChatBot sulla piattaforma Messenger di Facebook per l'inf...
Realizzazione di un ChatBot sulla piattaforma Messenger di Facebook per l'inf...Xhoi Kerbizi
 
Meetup DotNetCode Settembre 2018 - ASP.NET Core 2.1
Meetup DotNetCode Settembre 2018 - ASP.NET Core 2.1Meetup DotNetCode Settembre 2018 - ASP.NET Core 2.1
Meetup DotNetCode Settembre 2018 - ASP.NET Core 2.1dotnetcode
 
Power BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT CentralPower BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT CentralMarco Parenzan
 
Meetup Fluent Design e Progressive Web App
Meetup Fluent Design e Progressive Web AppMeetup Fluent Design e Progressive Web App
Meetup Fluent Design e Progressive Web Appdotnetcode
 
XMASDEV 2018 - XMAS GIFT ASSISTANT
XMASDEV 2018 - XMAS GIFT ASSISTANTXMASDEV 2018 - XMAS GIFT ASSISTANT
XMASDEV 2018 - XMAS GIFT ASSISTANTLuca Congiu
 

Similaire à Meetup DotNetCode A.I. Bot Framework and Azure Functions (20)

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

Plus de dotnetcode

Azure Meetup: Novità CosmosDB modalità Serverless e Cognitive Services
Azure Meetup: Novità CosmosDB modalità Serverless e Cognitive ServicesAzure Meetup: Novità CosmosDB modalità Serverless e Cognitive Services
Azure Meetup: Novità CosmosDB modalità Serverless e Cognitive Servicesdotnetcode
 
Azure Meetup: Understanding Azure App Service Plan
Azure Meetup: Understanding Azure App Service PlanAzure Meetup: Understanding Azure App Service Plan
Azure Meetup: Understanding Azure App Service Plandotnetcode
 
Azure Meetup: Keep your secrets and configurations safe in azure!
Azure Meetup: Keep your secrets and configurations safe in azure!Azure Meetup: Keep your secrets and configurations safe in azure!
Azure Meetup: Keep your secrets and configurations safe in azure!dotnetcode
 
Azure Meetup: Azure Storage/Datalake Deep Dive
Azure Meetup: Azure Storage/Datalake Deep DiveAzure Meetup: Azure Storage/Datalake Deep Dive
Azure Meetup: Azure Storage/Datalake Deep Divedotnetcode
 
Meetup Progressive Web App
Meetup Progressive Web AppMeetup Progressive Web App
Meetup Progressive Web Appdotnetcode
 
Meetup ASP.NET Core e Kubernetes
Meetup ASP.NET Core e KubernetesMeetup ASP.NET Core e Kubernetes
Meetup ASP.NET Core e Kubernetesdotnetcode
 
How to create custom modules for Visual Studio
How to create custom modules for Visual StudioHow to create custom modules for Visual Studio
How to create custom modules for Visual Studiodotnetcode
 
Meetup ASP.NET Core 2 e Docker
Meetup ASP.NET Core 2 e Docker Meetup ASP.NET Core 2 e Docker
Meetup ASP.NET Core 2 e Docker dotnetcode
 
Meetup DotNetCode Owasp
Meetup DotNetCode Owasp Meetup DotNetCode Owasp
Meetup DotNetCode Owasp dotnetcode
 
Meetup .NET & Micro ORM
Meetup .NET & Micro ORMMeetup .NET & Micro ORM
Meetup .NET & Micro ORMdotnetcode
 
Meetup ASP.NET Core Angular
Meetup ASP.NET Core AngularMeetup ASP.NET Core Angular
Meetup ASP.NET Core Angulardotnetcode
 
Webhooks Meetup
Webhooks MeetupWebhooks Meetup
Webhooks Meetupdotnetcode
 
Meetup DotNetCode Dependency Injection
Meetup DotNetCode Dependency InjectionMeetup DotNetCode Dependency Injection
Meetup DotNetCode Dependency Injectiondotnetcode
 
Presentazione DotNetSchool
Presentazione DotNetSchoolPresentazione DotNetSchool
Presentazione DotNetSchooldotnetcode
 

Plus de dotnetcode (14)

Azure Meetup: Novità CosmosDB modalità Serverless e Cognitive Services
Azure Meetup: Novità CosmosDB modalità Serverless e Cognitive ServicesAzure Meetup: Novità CosmosDB modalità Serverless e Cognitive Services
Azure Meetup: Novità CosmosDB modalità Serverless e Cognitive Services
 
Azure Meetup: Understanding Azure App Service Plan
Azure Meetup: Understanding Azure App Service PlanAzure Meetup: Understanding Azure App Service Plan
Azure Meetup: Understanding Azure App Service Plan
 
Azure Meetup: Keep your secrets and configurations safe in azure!
Azure Meetup: Keep your secrets and configurations safe in azure!Azure Meetup: Keep your secrets and configurations safe in azure!
Azure Meetup: Keep your secrets and configurations safe in azure!
 
Azure Meetup: Azure Storage/Datalake Deep Dive
Azure Meetup: Azure Storage/Datalake Deep DiveAzure Meetup: Azure Storage/Datalake Deep Dive
Azure Meetup: Azure Storage/Datalake Deep Dive
 
Meetup Progressive Web App
Meetup Progressive Web AppMeetup Progressive Web App
Meetup Progressive Web App
 
Meetup ASP.NET Core e Kubernetes
Meetup ASP.NET Core e KubernetesMeetup ASP.NET Core e Kubernetes
Meetup ASP.NET Core e Kubernetes
 
How to create custom modules for Visual Studio
How to create custom modules for Visual StudioHow to create custom modules for Visual Studio
How to create custom modules for Visual Studio
 
Meetup ASP.NET Core 2 e Docker
Meetup ASP.NET Core 2 e Docker Meetup ASP.NET Core 2 e Docker
Meetup ASP.NET Core 2 e Docker
 
Meetup DotNetCode Owasp
Meetup DotNetCode Owasp Meetup DotNetCode Owasp
Meetup DotNetCode Owasp
 
Meetup .NET & Micro ORM
Meetup .NET & Micro ORMMeetup .NET & Micro ORM
Meetup .NET & Micro ORM
 
Meetup ASP.NET Core Angular
Meetup ASP.NET Core AngularMeetup ASP.NET Core Angular
Meetup ASP.NET Core Angular
 
Webhooks Meetup
Webhooks MeetupWebhooks Meetup
Webhooks Meetup
 
Meetup DotNetCode Dependency Injection
Meetup DotNetCode Dependency InjectionMeetup DotNetCode Dependency Injection
Meetup DotNetCode Dependency Injection
 
Presentazione DotNetSchool
Presentazione DotNetSchoolPresentazione DotNetSchool
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