Botium connector for QnAmaker - Microsoft not working - automated-tests

Where can I find the required information below to create tests in QnA Maker?
“botium”: {
“Capabilities”: {
“PROJECTNAME”: “ActivebotTest”,
“CONTAINERMODE”: “qnamaker”,
“QNAMAKER_KNOWLEDGEBASE_ID”: “xxxxxxx”,
“QNAMAKER_RESOURCE_NAME”: “yyyyyy”,
“QNAMAKER_ENDPOINT_KEY”: “zzzzzz”,
“QNAMAKER_RESOURCE_KEY”: “vvvvvvvvvvvvvvv”,
…
}
}
I enter the information but this is the error I get:
Error QnA
The QnA Maker Feature uses “.cognitiveservices.azure.com” and does not “.azurewebsites.net”
It is outdated?
Thanks

Related

how to check Allow/Deny permission of Mobile Data for my app using xamarin forms

enter image description hereI am using xamarin forms. I need to check whether my app is having the permission of Mobile Data(not internet access). I cannot get any code for this.
Please refer the below images.enter image description here
You can check your device connectivity with Xamarin.Essentials
You will use the API this way :
var current = Connectivity.NetworkAccess;
if (current == NetworkAccess.Internet)
{
// Connection to internet is available
}
else
{
//Connection to internet is not available because mobile data is disable
}

google cloud vision api quickstart error opening file

I am following the following Google Cloud Vision quickstart:
https://cloud.google.com/vision/docs/quickstart
This is using the API Explorer, and I get
Error Opening File
I have created a bucket named vision2018, and checked Share Publicly for the file.
My portion of the request related to the file is:
"image":
{
"source":
{
"imageUri":"gs://vision2018/demo-image.jpg"
}
}
The response I get is:
{
"responses": [
{
"error": {
"code": 5,
"message": "Error opening file: gs://vision2018/demo-image.jpg\"."
}
}
]
}
}
What do I need to specify in order to access files in my GCP storage?
Alternatively, I read other Stack Overflows that talk about GOOGLE_APPLICATION_CREDENTIALS, Simple API Key, and "Create Service account key and download the key in JSON format", ... but these seem to be giving commands in the shell, which this quickstart doesn't even open.
Is there initial setup assumed prior to the quickstart?
I am not ready to call the api from code
You might want to doublecheck your request. I went to the quickstart, replaced the placeholder imageUri with gs://vision2018/demo-image.jpg and it worked just fine. The error message you posted is what would be displayed if you had given gs://vision2018/demo-image.jpg\" instead.
Regarding the second part of your question: these are authentication methods. In this particular case, under Authentication you will find a drop down which lets you chose between API key and Google OAuth 2.0. If you chose the former, you don't need to do anything as a demo key will be used just for the purposes of the quickstart. If you chose OAuth 2.0, a popup will appear prompting you to authenticate with a google account. All in all, what you need to do is follow step-by-step the instructions given by the quickstart.
I was receiving a similar JSON response from the Google Vision API:
"error": {
"code": 7,
"message": "Error opening file: gs://bucket/file.jpg."
}
The fix was to set the GCS file's permission to public-read:
gsutil acl set public-read gs://bucket/file.jpg
Finally I investigated what happened. The problem is that your API token is only grant for process the image (allow right to use OCR engine), but that API is not also for accessing object in GS.
Therefore "message": "Error opening file:
The problem is similar with this post:Authorize Google Cloud Vision API to Google Storage image Maybe the error message is a bit dumb than many years ago.
The solution also mentioned in the answer section, but if you want some thing more clear (expose security side-effect) here it is: Set GCS read-only public
Reason I want to keep using API because it's better for use it in mobile application, we cannot give the OAuth2.0 to any phone. However, still find a way to secure the read-public bucket.

IBM.WatsonDeveloperCloud Asp.Net package

I would like to use IBM Watson Conversation service to build a chatbot web application in the Asp.Net platform. I installed IBM.WatsonDeveloperCloud Asp.Net package today, but have no idea what I should do with it and there is no document. There are about 50 projects in the solution, which one can be used for the so called simple chatbot web application?
Watson Developer Cloud has all the documentation that you need to use Watson Services, include Conversation Service.
Here are some examples to use Conversation:
Installation
Nuget
PM > Install-Package IBM.WatsonDeveloperCloud.Conversation.v1
Project.json
"dependencies": {
"IBM.WatsonDeveloperCloud.Conversation.v1": "1.2.0"
}
Usage
You complete these steps to implement your application: Configure a workspace. With the easy-to-use graphical environment, you set up the dialog flow and training data for your application. Develop your application. You code your application to connect to the Conversation workspace through API calls.
Instantiating and authenticating the service
Before you can send requests to the service it must be instantiated and credentials must be set.
// create a Conversation Service instance
ConversationService _conversation = new ConversationService();
// set the credentials
_conversation.SetCredential(<username>, <password>);
Send message:
// create message request
MessageRequest messageRequest0 = new MessageRequest()
{
Input = new InputData()
{
Text = <input-string0>
}
};
// send a message to the conversation instance
var result0 = _conversation.Message(<workspace-id>, messageRequest0);
// reference the message context to continue a conversation
messageRequest messageRequest1 = new MessageRequest()
{
Input = new InputData()
{
Text = <input-string1>
},
Context = result.Context
};
// Send another message including message context.
result1 = _conversation.Message(<workspace-id>, messageRequest1);
Obs.: In this link have one full guide step-by-step to use Watson Conversation Service with .Net.
See the Official Documentation for .Net SDK
One good Tutorial Video Guide to Integrating Watson Conversation in your Application.
See the Official API Reference for use Watson Conversation Service (You can have a base with this link).

APIGEE Application level

I am trying to access a collection using my application client_id, and client secret as follows:
https://api.usergrid.com/my_org/my_app/my_collection?client_id=XXXXXX&client_secret=XXXXXX
I get the following error:
{
"error":"unauthorized",
"timestamp":1416953278007,
"duration":0,
"exception":"org.apache.usergrid.rest.exceptions.SecurityException",
"error_description":"No application access authorized"
}
Is there a setting in my app somewhere that I am not aware of?
You need to create an access code. This is explained here: http://apigee.com/docs/app-services/content/authenticating-users-and-application-clients. To use the access token, follow the instructions on this page: http://apigee.com/docs/app-services/content/authenticating-api-requests

Error 'Login Required' while calling Google Analytics API from Google Spreadsheet

I use google scripts to fill Google Spreadsheet by Google Analytics data.
Problem: I get error: Login Required when I call =getCountOfNewUsers(B1,B2) from my Spreadsheet file. NOTE: when I run runTest() from google script project everything working OK.
FYI: I have followed this tutorial.
function runTest() {
try {
var results = getCountOfNewUsers(new Date(), new Date());
Logger.log(results.totalsForAllResults["ga:newVisits"]);
} catch(error) {
Logger.log(error.message);
}
}
function getCountOfNewUsers(date_from, date_till) {
date_from = Utilities.formatDate(date_from, 'GMT', 'yyyy-MM-dd');
date_till = Utilities.formatDate(date_till, 'GMT', 'yyyy-MM-dd');
var tableId = 'ga:*****';
// Make a request to the API.
var results = Analytics.Data.Ga.get(tableId, date_from, date_till, 'ga:newVisits', {});
if (results.getRows()) {
return results;
} else {
throw new Error('No views (profiles) found');
}
}
This is not solution to your question but it directs you to easy better solution to your problem if your interested!, you can easily setup this solution in an hour!
Details:
Better Than A writing our own script with Diligent Study and make Google scripts to fill Google Spreadsheet by Google Analytics data I use this Google Analytics Report Automation (Magic Script)
This Magic Script allow you to simplifies this process and makes it
easy to get the data you want so that you can focus on analysis and
reporting.
Custom API Dashboards - No Code Required it will save your burden for
Writing Your Own Script.
About the Error Try following things
Go to script editor, click on Resources > click on Use Google APIs.
Click on "Google APIs Console".
select APIs & auth > click on Registered apps.
Do Register your script project as web application.
select Certificate > Generate New Key .
This is an expected behavior. Custom Functions cannot ask users to give access to personal data. So they are not suitable for all types of services, specifically those which need authorization for personal data.
Check this url to know which services you can use - https://developers.google.com/apps-script/guides/sheets/functions#using_apps_script_services
Unlike most other types of Apps Scripts, custom functions never ask users to authorize access to personal data. Consequently, they can only call services that do not have access to personal data

Resources