Closed hsachinraj closed 3 years ago
Hi @hsachinraj
A few things:
/id
Thanks @dmvtech for the clarification. I am still unable to get any data captured in the Blob or DB. Here are things I did
I have ensured the Blob storage connection strings and cosmos DB key, endpoint settings are correct. I republished the Bot and tried it from the Web chat. The bot works fine but no data (transcript or state) is recorded.
One more thing, in this Docs , the instruction is to put the connection string in the Blob storage settings. But I noticed when I provision a new profile from Composer, the connection string section for Blob contains the Key (and not the connection string itself).
Which one am I supposed to use, the entire connection string or just the key?
Which one am I supposed to use, the entire connection string or just the key?
For composer, just the key.
Let's focus on the state first. Does it reproduce with another bot (Say the Asking Questions
sample) without a custom runtime? You don't have to publish your bot to use the state store in the cloud with a locally running bot in Composer. Just set the following settings in the advanced settings view in Composer:
"cosmosDb": {
"authKey": "",
"containerId": "botstate-container",
"cosmosDBEndpoint": "",
"databaseId": "botstate-db"
},
@dmvtech , Okay it works with another bot (QnA Sample) perefctly. Both the state and the transcripts are saved in CosmosDB and Storage respectively. So, looks like the issue due to the custom runtime (Node). Is this a bug or do I need to implement any additional steps when I include custom runtime?
Also, btw, the connection string for the blob storage did not work with just the key alone. I received an error "unable to get a value for endpointkey from state" . When I changed it to the entire connection string, it worked.
Can I get some assistance here? I need to fix this quite urgently.
@dmvtech , Okay it works with another bot (QnA Sample) perefctly. Both the state and the transcripts are saved in CosmosDB and Storage respectively. So, looks like the issue due to the custom runtime (Node). Is this a bug or do I need to implement any additional steps when I include custom runtime?
Sorry for the delay. To confirm; you are still running the bot from Composer, even though it's a custom runtime. You're not running the custom runtime outside Composer with something like node ./lib/webapp.js
, correct?
The reason I am asking is that Composer sets a lot of it's configuration in the local storage. It does this for a few reasons, but security is one of them (like it won't write your app password to a file that could then get copied to somewhere, etc). So, if you are running a Composer bot outside of Composer, you will need to make sure your settings are setup in the appsettings.json. This is likely only to be needed running locally, as publishing handles getting all this stuff lined up and configured.
Also; how much is the custom runtime customized? I will test with a simple (un customized, but extracted node runtime) and see if I can reproduce.
Also, btw, the connection string for the blob storage did not work with just the key alone. I received an error "unable to get a value for endpointkey from state" . When I changed it to the entire connection string, it worked.
Right, sorry about that. I think I was thinking of something else.
@dmvtech I am only running it from the bot composer, not outside. The moment I add a custom runtime (JS), it stops logging the transcript. I have not tried with C# runtime.
The purpose of adding a custom runtime is I want to have it work with the Twilio WhatsApp endpoint, which is available as a JS extension in the Bot Builder community project.
You don't have to customize the runtime with this particular extension. You can reproduce it by just adding a custom runtime from the Composer and run it in the emulator (without any customization).
Yeah, I just reproduced. Looks like a bug or not implemented yet. I'll see if I can find more info.
Glad that you are able to reproduce. Hope it is something that can be quickly fixed or implemented.
@dmvtech very sorry to bother you, but I need this badly. Any chance this can be fixed quickly?
@joshgummersall Can you help out here? Is this something that is in the works/being fixed/etc?
@hsachinraj and @dmvtech we are in the process of writing v2 of the Javascript runtime. Unfortunately, this is taking precedence over changes to the existing preview runtime. You could certainly modify your Node.js runtime to create a transcript logger middleware on the adapter. I put together a diff here that you should be able to follow to get something working. You will need to "eject" your runtime and modify source code files, but that will unblock you for the time being.
Thank you so much @joshgummersall and @dmvtech . I will give this a try. Appreciate the support!
I am a newbie using the Bot Composer. I am trying to log conversation of the bot in CosmosDB. Here is how I have setup the CosmosDB settings in the Bot Composer Publish Profile:
I ran the bot in both local emulator and on Web chat from the Azure Portal. But no conversation is getting captured in comosDB. Are there any additional steps that needs to be done to achieve this? is there documentation that has instructions to do this from Composer (not from SDK)?
I am using Bot Composer version 1.3.1 on MacOS and I use Edge browser.
Here is the screenshot of my CosmosDB: