![]() String.Equals(x.From.Name, /*Bot_Name*/, StringComparison.Ordinal)).ToList() List botResponses = response?.Activities?.Where(x => ![]() To display bot response only, filter equals to your bot name response contains set of Activity from both user and bot response from bot is of type .ActivitySetĪctivitySet response = await (conversationtId, watermark) More information about watermark is available at To get the first response set string watermark = null Using (var directLineClient = new DirectLineClient(token)) Use the same token to create a directLineClinet You can filter response activities by your bot's name to get only the bot's response message. The retrieved Direct Line response activities contains both the user's and bot's messages. Retrieve the bot's response using the same token and converstaionId. UriBuilder uriBuilder = new UriBuilder(TokenEndPoint) using (var httpRequest = new HttpRequestMessage()) ![]() The following example uses samples from the Connector sample code to get a Direct Line token for a Power Virtual Agents bot. If the request is successful, a Direct Line token will be returned for the requested bot. To request a Direct Line token, issue a GET request to the endpoint below: GET /api/botmanagement/v1/directline/directlinetoken You need to add code that retrieves a Direct Line token with the Bot ID and Tenant ID from the previous section to your app. To start a conversation with your Power Virtual Agents bot, you need a Direct Line token. You'll need this in the Get Direct Line token step. In the navigation menu under Settings, select Channels. To connect to the bot you have built with Power Virtual Agents, you'll need to retrieve your bot's name and token endpoint to identify it.Ĭopy your bot's name in Power Virtual Agents. Retrieve your Power Virtual Agents bot parameters
0 Comments
Leave a Reply. |