-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create integration between entelligence and agentops repository (…
…#479) In this feature we're adding the pop up chat of entelligence inside the agentops repository
- Loading branch information
1 parent
4ce6f80
commit 6b37e1a
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters