Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
HowieG committed Aug 21, 2024
1 parent ac1c08e commit 4159fbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/v1/examples/multi_session.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 'Multi-Session Example'
description: 'Handling multiple sessions at the same time'
mode: "wide"
---
_View Notebook on <a href={'https://github.com/AgentOps-AI/agentops/blob/48ae12d4e4e085eed57346f1c40a054097431937/examples/multi_session_llm.ipynb'} target={'_blank'}>Github</a>_
_View Notebook on <a href={'https://github.com/AgentOps-AI/agentops/blob/main/examples/multi_session_llm.ipynb'} target={'_blank'}>Github</a>_

<div id="notebook" data-content-file="https://raw.githubusercontent.com/AgentOps-AI/agentops/main/docs/v1/examples/notebooks/multi_session_llm.html"></div>
<script src="/scripts/use_notebook.js"></script>
5 changes: 3 additions & 2 deletions docs/v1/scripts/use_notebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ async function loadContent(div_element) {
try {
const fileName = div_element.getAttribute('data-content-file');
const response = await fetch(fileName);

if (!response.ok) throw new Error('Network response was not ok');
div_element.innerHTML = await response.text();
} catch (error) {
Expand All @@ -13,7 +14,7 @@ async function loadContent(div_element) {
// Load content when the page is fully loaded
window.onload = function() {
const divs = document.querySelectorAll('div[data-content-file]');
divs.forEach(div => {
loadContent(div);
divs.forEach(async div => {
await loadContent(div);
});
};

0 comments on commit 4159fbe

Please sign in to comment.