Skip to content

Commit

Permalink
Fix dashboard
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Yuan <[email protected]>
  • Loading branch information
juntao committed Apr 4, 2024
1 parent e05731f commit 6e85b38
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Binary file modified dashboard.tar.gz
Binary file not shown.
12 changes: 12 additions & 0 deletions dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ <h1 class="jumbotron-heading">GaiaNet node dashboard</h1>
<p>
<a href="chatbot-ui/index.html" class="btn btn-primary">Chat with this node</a>
</p>
<p>Send an API request to the node using OpenAI JSON</p>
<p>
<pre><code id="api-req">
curl -X POST <public_url>/v1/chat/completions \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"messages":[{"role":"system", "content": "You are a helpful assistant."}, {"role":"user", "content": "Where is Paris?"}], "model":"Llama-2-7b-chat-hf-Q5_K_M"}'
</code></pre>
</p>
</div>
</section>

Expand Down Expand Up @@ -92,6 +101,9 @@ <h1 class="jumbotron-heading">GaiaNet node dashboard</h1>
val = data["rag_prompt"];
addToTable (key, val);

var code_snippet = document.getElementById("api-req").innerHTML;
document.getElementById("api-req").innerHTML = code_snippet.replace("<public_url>", "https://" + data["address"] + "." + data["domain"]);

}).catch(error => console.error('Error fetching JSON:', error));
</script>
</body>
Expand Down

0 comments on commit 6e85b38

Please sign in to comment.