Skip to content

Commit

Permalink
Bugfix, include llm-chat-content div but hide it
Browse files Browse the repository at this point in the history
  • Loading branch information
mcjustin committed Dec 3, 2024
1 parent ebfd6b5 commit 6889d0f
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions src/routes/(viewer)/ips/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -257,26 +257,24 @@
<IPSContent content={shlContents[0]} mode={$displayMode} />
{/if}

{#if showLlmChat} <!-- Conditional rendering for LLM chat content -->
<div id="llm-chat-content" style="display: block; margin: 30px;"> <!-- Changed display to block -->
<table id="chat-messages" style="width: 100%; border-collapse: collapse;">
<thead>
<tr>
<th>Your request</th>
<th>LLM Chat Response</th>
<th>Prompt Tokens</th>
<th>Response Tokens</th>
<th>Cost in US$ (prompt + response = total)</th>
</tr>
</thead>
<tbody>
<!-- Messages will be appended here -->
</tbody>
</table>
<input type="text" id="chat-input" placeholder="Ask a large language model about your health...">
<button id="send-message">Send to LLM</button>
</div>
{/if}
<div id="llm-chat-content" style="display: none; margin: 30px;"> <!-- Changed display to block -->
<table id="chat-messages" style="width: 100%; border-collapse: collapse;">
<thead>
<tr>
<th>Your request</th>
<th>LLM Chat Response</th>
<th>Prompt Tokens</th>
<th>Response Tokens</th>
<th>Cost in US$ (prompt + response = total)</th>
</tr>
</thead>
<tbody>
<!-- Messages will be appended here -->
</tbody>
</table>
<input type="text" id="chat-input" placeholder="Ask a large language model about your health...">
<button id="send-message">Send to LLM</button>
</div>

<style lang="css">
:global(.loader) {
Expand Down

0 comments on commit 6889d0f

Please sign in to comment.