Skip to content

Conversation

@spastorelli
Copy link
Contributor

@spastorelli spastorelli commented Nov 3, 2025

Since we are adding ingestion of conversation of the Slack integration (in this PR) and need to support it in app mention as well. So we need a good way to detect the intent of the user invoking the Slack bot via app mention.

This PR aims at using OpenAI lightweight model to help with this.

Demo

Requesting to ingest conversation Asking a question
Screen.Recording.2025-11-06.at.12.14.46.mov
Screen.Recording.2025-11-06.at.12.20.36.mov

Based on branch from #1030

@changeset-bot
Copy link

changeset-bot bot commented Nov 3, 2025

🦋 Changeset detected

Latest commit: 170181a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@gitbook/integration-slack Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@spastorelli spastorelli force-pushed the steeve/add-ingest-conv-app-mention-slack branch 2 times, most recently from bfce4aa to 364090f Compare November 3, 2025 09:35
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 3, 2025

Open in StackBlitz

bun add https://pkg.pr.new/GitbookIO/integrations/@gitbook/api@1031

commit: 170181a

@spastorelli spastorelli force-pushed the steeve/add-ingest-conv-app-mention-slack branch from 29bf0c0 to c4b67a6 Compare November 5, 2025 14:59
@spastorelli spastorelli changed the title Experiment: using simple classifier to detect intent of user when using Slack app mention Use AI to detect intent of user when using Slack app mention Nov 5, 2025
@spastorelli spastorelli force-pushed the steeve/add-ingest-conv-app-mention-slack branch from 76eb895 to 198136b Compare November 5, 2025 18:40
@spastorelli spastorelli marked this pull request as ready for review November 6, 2025 11:23
@spastorelli spastorelli force-pushed the steeve/add-ingest-conv-app-mention-slack branch from 89c0640 to d09877c Compare November 7, 2025 09:32
@spastorelli spastorelli merged commit f9a4bbf into steeve/add-ingest-conv-slack-integration Nov 7, 2025
12 checks passed
@spastorelli spastorelli deleted the steeve/add-ingest-conv-app-mention-slack branch November 7, 2025 09:52
spastorelli added a commit that referenced this pull request Nov 7, 2025
* Add conversations:ingest scope to manifest

* Move actions/tasks related types to specific file

* Add utils to retrieve Slack thread and parse convo permalinks

* Add shortcut & command handling for conversation ingestion

* Fix message sending and improve message copy

* Improve notification message when conv is ingested from permalink

* Fix subcommand text parsing

* Add changeset

* review: call ingestion API directly from exec thread instead of using task

* review: add comment to getActionNameAndType

* review: Add comments to ingest actions params

* review: remove gitbook ingest command handler for now

* Use AI to detect intent of user when using Slack app mention (#1031)

* Add training script and classifier

* Add gitignore

* Fix format

* Fix typing

* Use OpenAI model to infer intent instead of a classifier

* Improve prompts and return assitant response when asking for clarification

* Make API key env var Slack specific

* Set assistant status to provide the user with waiting message

* Add SLACK_OPENAI_API_KEY env var to turbo.json

* Remove log

* Additional perf improvement

* Add changeset

* Add SLACK_OPENAI_API_KEY env var to workflows

* review: use op for secrets and clean up missed files

* Re-add bun.lock after rebasing

* Add bun.lock

* Feature flag conversations ingestion in Slack integration (#1043)

* Feature flag conversation ingestion

* Pull reflag secret from op

* Use app URL based on intengration installation instead of hard coded one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants