Try it out!
You may embed the inmydata Copilot in your own web app. This is a great way of instantly adding a simple, user-friendly way of asking questions of your data and generating charts that visualise the answers. Use the inmydata-copilot component like so:
<inmydata-copilot tenant="example" />
Attributes (please see Getting Started for common attributes):
- subject: The name of the subject that you wish to ask questions of
- question: any question you may know up-front, such as a regular question you may have about your data (e.g. "What are today's top 5 sales?")
- dashboard-id: If your question relates to a dashboard you are displaying, pass its ID here
If your tenant is 'example' (that is, example.inmydata.com), pass these parameters like so:
<inmydata-copilot tenant="example" subject="Store Sales" question="What are today's top 5 sales"/>
Events
The following events are emitted by the Copilot, and will be named "inmydata.copilot.<event>":
- answer: an answer emitted by the Copilot
- showcharts: the user has clicked the "Show Charts" button to see the charts generated in an answer.
The event data will be formatted like so, with an event name, and arguments expressed in JSON (common attributes omitted for brevity):
inmydata.copilot.answer: { "aiChatMessage": { "messageType": 1, "sequence": 1, "text": "please wait, just looking for your answer" }, "chatSessionId": "123456789" ... }
Events have the following arguments (please see Getting Started for common arguments):
- chatSessionId: the unqiue id of the Copilot chat session
- aIChatMessage: an object describing an answer from Copilot, with the following properties:
- messageType: 0: question , 1: thought, 2: response, 3: cannedResponse
- sequence: the unique number identifiying the message within the session
- text: the text of the answer
- rating: any "thumbs up/down" rating given. Values are 0: none, 1: like, 2: dislike
- dashboardObjectIds: an array of IDs of charts generated in Copilot answer
- user: Id of the authenticated user
- eventName: name of the event, e.g. "inmydata.showcharts"
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article