DialogFlow com.google.apps.framework.request.NotFoundException: No DesignTimeAgent - dialogflow-es

I've tried multiple times creating a chatbot with dialogflow.
I call dialogflow from nodejs api. In details I try to call detectIntent but always I receive this error: com.google.apps.framework.request.NotFoundException: No DesignTimeAgent.
I have tried with #google-cloud/dialogflow and dialogflow npm packages.
Could you please help me?
Happy new year to all

Related

Unable to extract log from watson assistant

Please I have struggling with consuming watson assistant log API. currently we use watson assistant log API for fetching daily conversation log between our chatbot and customer and feed the log into NLC for classifying the intents for precision analyst. Recently we observed that IBM has decomission the NLC and advice that we migrate to NLU. since then we've being having issues getting the component running.
right now the assistant log return empty log for this filterĀ 
authenticator = IAMAuthenticator('********')
assistant = AssistantV2(
version='2021-06-14',
authenticator = authenticator
)
assistant.set_service_url('https://api.eu-gb.assistant.watson.cloud.ibm.com')
print("The assistant URL ")
response=assistant.list_logs(
assistant_id='******', page_limit=100, filter='response_timestamp>2022-09-14T00:00:00.000Z',
cursor=cursor).get_result()
response=assistant.list_logs(
assistant_id='*******').get_result()
print(json.dumps(response, indent=2))
#print("the response is ",response)
this is returning an empty data
{
"logs": [],
"pagination": {}
}
Here are some reasons why this may occur.
You are using V2 API which requires an Enterprise account. If you only have Plus then you can use the V1 API. But there is no guarantee it will continue to work as expected in the future.
You don't have any logs for that date range. Check in the Analytics page.
An issue in your code. Try running the sample code on the REST API docs. If this works then compare against your code.
Your filter looks ok, but try this filter (change language and assistant ID):
language::en,request.context.system.assistant_id::<YOUR_ASSISTANT_ID>,response_timestamp>2022-09-14T00:00:00.000Z
Seeing as you have midnight as your time, you can also change that part to:
response_timestamp>2022-09-14

Initiate message from bot in dialogflow

I want to get the welcome message from bot first in dialogflow. I am not sure how to do this. Any ideas on how to do this.
I tried reading about events in dialogflow as Default welcome intent uses "Welcome" event. But not able to find any solution.
As I opened up my bot framework, it should pop up "Hi, I am a virtual assistant. How can I help you?"
I am not sure of which bot technology you are using, but if your front end is in html/js, you may call a function like this:
Define it something like:
function myFunction(){
''here you may pass a parameter to your bot to display a pre-defined message. I am not going in details here, as I am not sure about the framework you are using.''
}
The onload (in body) will call myFunction(), everytime the page is refreshed.
P.s - I will update this answer once I get more details from your end. Since I am new here, please excuse in case of any issues.

Fullfillment error "Platform "GOOGLE_HANGOUTS' not supported." when using inline editor to fulfill my code after hitting an API

I am hitting an API and returning required values to a chat-bot. Though I am getting response in Dialogflow's Default Response Simulator but for the same code I am not getting any response in Hangout chat API (I have integrated Dialogflow with Hangout chat).
function func_name(agent){
const abcd = agent.parameters.abcd;
agent.add(`Below are the products related to ${abcd}`);
return axios.get(`https://*********************/****/${abcd}`)
.then((result)=>{
result.data.map(abcdObj => {
agent.add(JSON.stringify(abcdObj.name+"~"+abcdObj.key));
});
});
and the error message what I am receiving is:
Error: Platform 'GOOGLE_HANGOUTS' not supported.
Function execution took 12 ms, finished with status: 'crash'
So, here I got solution for the issue by google. You will have to upgrade the version of dependencies , dialogflow version to 0.7.0 and dialogflow-fulfillment to 0.6.1 in package.json of your fulfillment code and if your bot still doesn't work try to create new bot with same functionality. It will help for sure.

I want to send platform specific responses using dialogflow fullfilment

I built a bot that is integrated to messenger and default bot on website using dialogflow now the bot have default response and messenger response but when I go to the fullfilment i cant set a specific response for each
here is my code
function time(agent) {
if (currentlyOpen()) {
agent.add(`Hi, We're open now! We close at 11pm today.`);
} else {
agent.add(`We're currently closed, but we open every day at 6am!`);
}
}
I want to have a diffrent response if I am using messenger as the default response goes to the default bot
"I know I can inrtegrate messenger in the website but I want to know this way as I use it for more bots"
You can do that using the same library that you are using for agent. To send specific platform response just add the platform to the response. For example, if you want send a text specifically to Google Assistant then you can do that using agent.add(new Text({ text: 'text_here', platform: 'ACTIONS_ON_GOOGLE'}));.
The full Dialogflow fulfillment code is available on GitHub. https://github.com/dialogflow/dialogflow-fulfillment-nodejs. I have also modified some code to set some other responses that are not available in this library such as telephony transfer and speech responses. So, if you want you can do that too.

Function url missing after deployment in dialogflow

I am trying to deploy an index.js file in the dialogflow. so when I finish the steps if the deployment I am supposed to receive a Project Console and a Function Url. This function url is supposed to be added to the Fulfillment url to get the chatbot running. But I receive only the Project console as can been seen in the screenshot attached.
Anyone has an idea why?

Resources