Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add report AI invalid responses btn #22

Merged
merged 3 commits into from
Apr 26, 2024
Merged

Add report AI invalid responses btn #22

merged 3 commits into from
Apr 26, 2024

Conversation

mszostok
Copy link
Collaborator

@mszostok mszostok commented Apr 24, 2024

Description

Changes proposed in this pull request:

  • Add report AI invalid responses btn

Testing

Repo botkube-cloud-plugins:

  • gh pr checkout 22
  • PLUGIN_TARGETS='ai,ai-brain' make build-plugins-single
  • make serve-local-plugins

Repo botkube-cloud:

  • gh pr checkout 1032
  • update config:
    pluginRepositories:
      botkubeCloud:
        type: Public
        url: http://host.k3d.internal:3010/botkube.yaml
  • make sure the Segment API key for your test org is set
  • start:
    • Teams router
    • Slack router
    • Backend
    • UI
  • Create Instance in UI with Teams and Cloud Slack with AI enabled
  • Ask AI some question, report answer and check Segment.io

Demo

Screenshot 2024-04-25 at 15 31 45 Screenshot 2024-04-25 at 15 33 03

Note

Discord and Mattermost don't support interactivity. Additionally, they don't support cloud commands, meaning we're not able to easily add support for those platforms.

Related issue(s)

@mszostok mszostok added the enhancement New feature or request label Apr 24, 2024
Comment on lines 119 to 133
{
ParentActivityID: messageID,
BaseBody: api.Body{
// We use the Plaintext to make sure that Teams renderer will send
// as simplified card (https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/format-your-bot-messages#format-text-content)
// instead of AdaptiveCard (https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-format?tabs=adaptive-md%2Cdesktop%2Cconnector-html#format-cards-with-markdown)
// which doesn't support most of the markdown elements.
Plaintext: markdownToTeams(response),
},
},
{
ParentActivityID: messageID,
Sections: []api.Section{
{
Buttons: api.Buttons{btn},
},
},
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, we need to send 2 messages, reason:

@mszostok mszostok requested a review from pkosiec April 25, 2024 13:17
@mszostok mszostok marked this pull request as ready for review April 25, 2024 15:07
@mszostok mszostok requested a review from a team April 25, 2024 15:07
Copy link
Collaborator

@pkosiec pkosiec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, will test it to dev e2e 👍

internal/source/ai-brain/response.go Outdated Show resolved Hide resolved
@mszostok mszostok enabled auto-merge (squash) April 26, 2024 17:24
@mszostok mszostok merged commit 8fe4397 into main Apr 26, 2024
4 checks passed
@mszostok mszostok deleted the add-ai-report-btn branch April 26, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants