Skip to content

Commit

Permalink
feat: create integration between entelligence and agentops repository (
Browse files Browse the repository at this point in the history
…#479)

In this feature we're adding the pop up chat of entelligence inside the agentops repository
  • Loading branch information
fernando-plank authored Oct 31, 2024
1 parent 4ce6f80 commit 6b37e1a
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docs/v1/scripts/entelligence.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
function initEntelligence() {
const script = document.getElementById("entelligence-chat");

if (!script) {
const chatScript = document.createElement("script");
chatScript.type = "module";
chatScript.id = "entelligence-chat";
chatScript.src =
"https://d345f39z3arwqc.cloudfront.net/entelligence-chat.js";

// Create initialization script
const initScript = document.createElement("script");
initScript.type = "module";
initScript.textContent = `
window.EntelligenceChat.init({
analyticsData: {
repoName: "agentops",
organization: "AgentOps-AI",
apiKey: "1234567890",
theme: 'dark'
}
});
`;

// Append initialization script after chat script loads
chatScript.onload = () => {
document.body.appendChild(initScript);
};

// Append chat script to the body
document.body.appendChild(chatScript);
}
}

window.addEventListener("load", function () {
initEntelligence();
});
19 changes: 19 additions & 0 deletions docs/v1/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,23 @@
text-align: center;
padding: 0;
margin: 0;
}

.hidden {
display: none;
}

@media (min-width: 1024px) {
.lg\:block {
display: block;
}
.lg\:hidden {
display: none;
}
}

@media (min-width: 768px) {
.md\:block {
display: block;
}
}

0 comments on commit 6b37e1a

Please sign in to comment.