Coder Social home page Coder Social logo

Comments (4)

compulim avatar compulim commented on May 24, 2024

@dabgar could you give us some details on this? In #3668, Peter suggested telemetry could be logged through these two classes:

https://github.com/microsoft/botbuilder-dotnet/blob/main/libraries/Microsoft.Bot.Builder.AI.QnA/Dialogs/QnAMakerDialog.cs
https://github.com/microsoft/botbuilder-dotnet/blob/main/libraries/Microsoft.Bot.Builder.AI.QnA/QnAMaker.cs

Are you saying that, even coded added to log telemetry data through these classes, it is not appearing in App Insights?

from botframework-solutions.

dabgar avatar dabgar commented on May 24, 2024

Screenshot 2021-09-24 at 10 31 05 AM

Attaching a screenshot of the issue faced.
The code shared is C# code , is there a nodejs version of the same.
Also like answer and question which comes directly without adding any code is it not possible to get the metadata similar way?

Let me know the way to get the metadata of qnamaker in the insight(complete procedure with the query please)

from botframework-solutions.

joshgummersall avatar joshgummersall commented on May 24, 2024

@dabgar, Peter's suggestion of writing a custom dialog to achieve this would be my recommendation as well. Unfortunately, we do not have a sample available that illustrates how to achieve this functionality.

There is a sample custom dialog, the MultiplyDialog in the samples repo that shows how to write a custom dialog.

The general approach you would take is to write a custom dialog extending from QnAMakerDialog, probably overriding the protected getQnaMakerClient(...) method to return a custom QnAMaker implementation that includes the metadata you care about in the onQnaResults method. Below is some pseudocode that illustrates the example

class CustomQnAMakerDialog extends QnAMakerDialog {
  async getQnaMakerClient(dialogContext) {
    const client = await super.getQnAMakerClient(dialogContext);

    const onQnaResults = client.onQnaResults.bind(client);
    client.onQnaResults = (qnaResults, turnContext, properties = {}, metrics = {}) => {
      properties = { ...properties, custom: 'property' };
      metrics = { ...metrics, custom: 1.0 };

      return onQnaResults(qnaResults, turnContext, properties, metrics);
    }
  }
}

As I mentioned above, this is pseudocode so you will have to study it and probably amend it further to suit your needs. I hope this helps!

from botframework-solutions.

EricDahlvang avatar EricDahlvang commented on May 24, 2024

Closing with Josh Gummersall's answer.

from botframework-solutions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.