-
Notifications
You must be signed in to change notification settings - Fork 78
Add native AI experience for RunLLM in GitBook #947
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: c4eac48 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exciting to see this @addisonschultz , thank you for getting us integrated with gitbook more smoothly
Hi @likawind
This PR adds extra functionality to the RunLLM integration to tap into GitBook native UI.
What we’ve added to GitBook
We’ve introduced a new feature to allow AI integrations to use the native GitBook UI/search, instead of defaulting to the GitBook assistant. This will allow GitBook users to choose what type of AI experience they want. Previously, this was not possible, meaning many GitBook sites using AI integrations would have 2 experiences - the GitBook Assistant and a floating button/AI, such as RunLLM.
UI/Video
479316504-d09e8d21-7d13-4289-8404-fac5d04297d3.mov
Note: This video shows the GitBook Assistant still enabled, causing there to be 2 buttons for AI chat in the UI (next to the search bar). Ideally, users would disable the GitBook Assistant after adding this integration, meaning only one AI button would appear.
What this PR does
This PR adds the newly created API from the integration platform to allow AI integrations to tap into the GitBook UI. It also introduces an extra configuration native_ai_experience to allow users to select the AI experience they want (Native using GitBook UI, or Non-native (continue using the floating button in the lower corner).
The call for
registerCustomAssistant
has a few properties that can be changed.Required props:
label
: The name of the AI assistanticon
: An icon to display in the UI to represent the assistant. Must be an icon from https://fontawesome.com/. Custom icons are not supported at this time.open
: Function called when the UI button (next to the search bar) is pressed or question is asked. Meant to open the RunLLM modal, in this instance. Contains an argument query which contains a question when asked from the search UI.Image for reference:

Optional prop:
ui?
: Optional property whether to display the UI for this integration. This should be used if a user does not want to show the button in the UI (next to the search bar), but would like to continue to use the floating button in the lower right (injected from RunLLM). The reason we introduced this flag, is because we still want integrations to register through this new API, allowing users to tap into the search/ask workflow to ask questions and still fire the RunLLM modal. (See image above)What still needs to be done/discussed