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

feat(docs): Cookbook Onboard (AI Assistant) integration #2198

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/_static/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,24 @@ $(document).ready(function () {
$("option[value='" + selected + "']").attr("selected", "selected");
window.location = document.URL.replace(current, selected);
});

// Cookbook Onboard (AI Assistant).
Copy link
Member

Choose a reason for hiding this comment

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

I don't see anywhere that controls for following text:

Screenshot 2024-08-01 at 16 38 42

ApeWorX does not have the correct casing, and where it is coming from (?) is mysterious...

Copy link
Author

Choose a reason for hiding this comment

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

Sorry for taking so long to reply! We have a CMS website where you can customize suggestions, view questions asked and the bot's responses, configure and update data sources, and much more! If you'd like an invite link, just reach out to us at hello@cookbook.dev from your corporate email, or please ask your colleague Chris (whom we chat with on Telegram) to add you to the chat :)

// API key is public so it's fine to just hardcode it here.
var COOKBOOK_PUBLIC_API_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2NmFhY2QzYjZiYmI2MmQwOGY0ZjYzNzgiLCJpYXQiOjE3MjI0Njk2OTEsImV4cCI6MjAzODA0NTY5MX0.Xw4JO3X3T19NOGqPnsz_DYDEBdsxNYM9JkZK4k8ADs8";
Copy link
Member

Choose a reason for hiding this comment

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

What is the point of a public API key?

Copy link
Author

Choose a reason for hiding this comment

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

It is used to make user interactions with Ask Cookbook available for your review in the CMS, allowing you to further tune replies by leaving feedback on conversations. Additionally, it enables you to dynamically configure the appearance of Ask Cookbook using the same CMS

var element = document.getElementById("__cookbook");
if (!element) {
element = document.createElement("div");
element.id = "__cookbook";
element.dataset.apiKey = COOKBOOK_PUBLIC_API_KEY;
document.body.appendChild(element);
}

var script = document.getElementById("__cookbook-script");
if (!script) {
script = document.createElement("script");
script.src = "https://cdn.jsdelivr.net/npm/@cookbookdev/docsbot/dist/standalone/index.cjs.js";
script.id = "__cookbook-script";
script.defer = true;
document.body.appendChild(script);
}
});