Tuesday, July 09, 2019

Cognitive Services and Authentication using Single Subscription Key

Any request to Cognitive Services needs to be authenticated. For using single Cognitive Service like Computer Vision or Custom Vision you can use separate subscription key for each specific service to authenticate your requests.
Pre-requisites
  • Azure Subscription
Steps
1. Log on to the Azure Portal
2. Create a new resource “Computer Vision” from the marketplace.















3. Type a name for the resource, subscription, location, pricing tier and resourcing group.




















4. Once the resource is created, note down the endpoint and access keys. The access key can be used only to authenticate to “Computer Vision” resource and cannot be used to authenticate other Cognitive Services like Custom Vision, Text Analytics etc.


























Download code: https://github.com/shantha05/CognitiveServices
Technorati Tags: Cognitive Services

Wednesday, December 26, 2018

Azure Resource Explorer in Azure Data Studio

Using Azure Resource Explorer in Azure Data Studio you can now manage Azure SQL Server, Azure SQL database, and Azure SQL Managed Instance resources.
1. Open “Azure Data Studio” and an Azure icon appears in the left menu bar. Click the icon to open “Azure Resource Explorer”.
AzureResourceExplorer1
2. Sign into Azure
AzureResourceExplorer2
3. Click the “Add an Account” button and you will be shown with the Device Code and URL and click on “Copy and Open” button and it will open the URL and Type the Device Code.
AzureResourceExplorer3
4. Pick the Azure account to sign in
AzureResourceExplorer4
5. Once signed in, the below window will be shown.
AzureResourceExplorer5
6. Close the above browser window and go back to Azure Data Studio to see the below screenshot.
AzureResourceExplorer6
7. Expand the connection to the see the list of subscriptions and SQL Services under them.
AzureResourceExplorer7
8. Finally you can also add Firewall rule to allow access to the Azure SQL Server.
AzureResourceExplorer8

Azure Data Studio

Azure Data Studio is a cross-platform database tool for data professionals using the Microsoft family of on-premises and cloud data platforms on Windows, MacOS, and Linux. It was previously called as “SQL Operations Studio”. It has been engineered keeping Data Platform user in mind. Azure Data Studio has been designed to focus on commonly used functionality with any additional experiences made available as extensions.

Microsoft informs that “The vision of the product is to create a unified experience across heterogenous data sources regardless of their form or location: structured or unstructured, on-premises or cloud. Azure Data Studio currently offers built-in support for SQL Server on-premises and on the cloud and Azure SQL Database, along with preview support for Azure SQL Managed Instance, Azure SQL Data Warehouse and SQL Server 2019 Big Data Clusters.”

Use Azure Data Studio if you:
  • Need to run on macOS or Linux
  • Are connecting to a SQL Server 2019 big data cluster
  • Spend most of your time editing or executing queries
  • Need the ability to quickly chart and visualize result sets
  • Can execute most administrative tasks via the integrated terminal using sqlcmd or PowerShell
  • Have minimal need for wizard experiences
  • Do not need to do deep administrative configuration
Use SQL Server Management Studio if you:
  • Spend most of your time on database administration tasks
  • Are doing deep administrative configuration
  • Are doing security management, including user management, vulnerability assessment, and configuration of security features
  • Make use of the Reports for SQL Server Query Store
  • Need to make use of performance tuning advisors and dashboards
  • Are doing import/export of DACPACs
  • Need access to Registered Servers and want to control SQL Server services on Windows
Getting Started with Azure Data Studio

Download Azure Data Studio

1. Open Azure Data Studio
AzureDataStudio1
 
2. To connect to SQL Server, select
  • Connection Type: Microsoft SQL Server
  • Server: [Your SQL Server Instance name]
  • Authentication Type: [Windows Authentication/SQL Login]
  • User name: [username, if SQL Login]
  • Password: [password, if SQL Login]
  • Database: [choose the Database name you would like to connect]
  • Server Group: [Group servers under common heading]
AzureDataStudio2
3. Set any Advanced Properties if required.
AzureDataStudio3
4. Click connect and you can see a screenshot similar to below.
AzureDataStudio4
Technorati Tags: ,,,

Tuesday, March 06, 2018

Creating a Basic bot using Bot Service

In the earlier post we looked at how to create a bot using Visual Studio 2017, today we will see how to create a bot using Bot Service. Bot Service provides core components for building bots. This includes the Bot Builder SDK for developing the bots and Bot Framework for connecting the bots to the channels.
Bot Service provides 5 templates as shown below. In this post we can see how to create a Bot using the Basic Template and C# on Azure Portal.
BotService3
Basic Template
Select the Web App Bot
BotService1
Provide the following details for the Web Bot and Select the Basic Template and click “Create”
BotService4
Once created you see see the endpoint for the BasicBotExample as shown below
BotService5
You can also download the sample solution and start customising it.
BotService8

BotService9
Now the Basic Bot has been created successfully and let us check that by Testing it in Web Chat.
BotService7

Introduction to Bots and Microsoft Bot Framework

bot_thumbWhat are Bots?
Bots are designed to solve common business problems using a natural, conversation-style approach combined with Machine Learning for Advanced Intelligence.
What are Chatbots?
A chatbot is a service, powered by rules and sometimes artificial intelligence, interacting with via a chat interface. (Skype, Microsoft Teams, Facebook messenger, Slack, Telegram)
Microsoft Bot Framework
The Microsoft Bot Framework enables organisations to build and deploy intelligent bots and provides tools to build and connect intelligent bots that interact naturally wherever the users are talking, from text/sms to Skype, Slack, Office 365 mail and other popular services.
 BotFrameworkBot
The Bot Framework provides tools to easily solve these problems and more for developers e.g., automatic translation to more than 30 languages, user and conversation state management, debugging tools, an embeddable web chat control and a way for users to discover, try, and add bots to the conversation experiences they love.
The Bot Framework has a number of components including the Bot Connector, Bot Builder SDK, and the Bot Directory.
Creating your first Bot using Visual Studio 2017
Make sure the following pre-requisites are downloaded and installed successfully.
a) Bot Framework Emulator (https://github.com/Microsoft/BotFramework-Emulator)
b) Download the Bot Application Template from http://aka.ms/bf-bc-vstemplate and download the BotApplication.zip file and copy it to the Visual Studio Templates folder for C# (The location of the Templates folder can be identified using the below screenshot)
BotFramework1
Creating your first Bot
  • Open Visual Studio 2017 as Administrator and click on “New Project” and select “Bot Application”
BotFramework2
  • The Bot Application Project creates a fully functional bot named “Echo Bot”
  • Press F5 to confirm that the “Echo Bot” application runs successfully and you see the following screenshot.
BotFramework3
  • Now let us invoke the EchoBotApplication endpoint using the Microsoft Botframework Emulator.
BotFramework4
  • Just click on the “Connect” button and start typing the message “Welcome to your first Bot Application” and the bot will respond with the no. of characters of the input text.
BotFramework5
  • Click on the message sent and you can see the corresponding JSON that was sent to the Bot and the same way you can see the JSON for the response also.
BotFramework6
BotFramework7
  • Now you have created your first bot.
Let us see how can we create more real world bots in subsequent blog posts.