Overview

We want to introduce a way to record interactions with Canvas AI prompts. The goal is to monitor how the AI is being used and understand the status of these interactions. This information will help improve the usefulness of the AI by providing insights into its usage patterns.

  • There should be a way to turn logging on / off for Canvas AI prompt interactions.
  • When enabled, all interactions with Canvas AI prompts should be recorded.

Proposed resolution

Update CanvasAISettingsForm to include a checkbox for "Enable Logging".

  • Create two new events. Ex:
    • PREPARE_AI_LOG (src/Event/PrepareAiLogEvent): Responsible for building the logs array. Module developers can subscribe to this event to add or alter data to be logged.
    • LOG_AI_PROMPT (src/Event/LogAiPromptEvent): Responsible for sending or storing the logs array. Module developers can subscribe to this event to send log data to external or store it locally.

Update the render() method of the CanvasAIBuilder class to dispatch events accordingly.

Issue fork canvas-3557146

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

vishalkhode created an issue. See original summary.

utkarsh_33 made their first commit to this issue’s fork.

utkarsh_33’s picture

Status: Active » Needs review
utkarsh_33’s picture

Assigned: Unassigned » utkarsh_33
Status: Needs review » Needs work
utkarsh_33’s picture

Assigned: utkarsh_33 » Unassigned
Status: Needs work » Needs review
vishalkhode’s picture

Assigned: Unassigned » vishalkhode
Status: Needs review » Active
vishalkhode’s picture

Moving this back until the logs data storage decision is finalised.

rakhimandhania’s picture

rakhimandhania’s picture