Skip to content

Commit

Permalink
Rename AI to LLM
Browse files Browse the repository at this point in the history
  • Loading branch information
mcjustin committed Oct 16, 2024
1 parent e92651a commit ae3263e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
let fhirResources = null;

function initAIChat(resources) {
function initLLMChat(resources) {
fhirResources = resources;
const aiChatContent = document.getElementById('ai-chat-content');
const llmChatContent = document.getElementById('ai-chat-content');
const chatInput = document.getElementById('chat-input');
const sendMessageButton = document.getElementById('send-message');

Expand Down Expand Up @@ -55,4 +55,4 @@ function appendMessage(role, content) {
chatMessages.scrollTop = chatMessages.scrollHeight;
}

export { initAIChat };
export { initLLMChat };
12 changes: 6 additions & 6 deletions static/ips/assets/js/renderIPS.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import config from "./config.js";
import { initAIChat} from "./aiChat.js";
import { initLLMChat} from "./llmChat.js";
var { pdfjsLib } = globalThis;
pdfjsLib.GlobalWorkerOptions.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.mjs';

Expand All @@ -22,7 +22,7 @@ $(document).ready(function () {
$('#content').show();
$('#FhirDropdown').on('click', () => updateDisplayMode('Entries'));
$('#NarrativeDropdown').on('click', () => updateDisplayMode('Text'));
$('#AiChatDropdown').on('click', () => updateDisplayMode('AiChat'));
$('#LlmChatDropdown').on('click', () => updateDisplayMode('LlmChat'));
});

function loadSample() {
Expand All @@ -45,7 +45,7 @@ function updateDisplayMode(displayMode) {
newText = 'App Interpretation';
} else if (displayMode == 'Text') {
newText = 'Generated Text';
} else if (displayMode == 'AiChat') {
} else if (displayMode == 'LlmChat') {
newText = 'AI Chat';
}
if (newText) {
Expand All @@ -54,8 +54,8 @@ function updateDisplayMode(displayMode) {
}

// Show/hide content based on selected mode
//$('#rendered-ips').toggle(mode !== 'AiChat');
$('#ai-chat-content').toggle(mode === 'AiChat');
//$('#rendered-ips').toggle(mode !== 'LlmChat');
$('#ai-chat-content').toggle(mode === 'LlmChat');

shlContents.forEach((e, i) => {
update(e, i);
Expand Down Expand Up @@ -243,7 +243,7 @@ function addTab(name, id) {
// Primary function to traverse the Bundle and get data
// Calls the render function to display contents
function update(ips, index) {
initAIChat(ips);
initLLMChat(ips);
sectionCount = 0;
$(`.output${index}`).html("");
$("#renderMessage").hide();
Expand Down
4 changes: 2 additions & 2 deletions static/ips/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<script type="module" src="/ips/assets/js/renderIPS.js"></script>
<script type="module" src="/ips/assets/js/retreiveIPS.js"></script>

<script type="module" src="/ips/assets/js/aiChat.js"></script>
<script type="module" src="/ips/assets/js/llmChat.js"></script>

<title>IPS Viewer</title>
</head>
Expand Down Expand Up @@ -98,7 +98,7 @@
<a id="NarrativeDropdown" class="dropdown-item" style="cursor:pointer">
Display text generated by IPS source
</a>
<a id="AiChatDropdown" class="dropdown-item" style="cursor:pointer">
<a id="LlmChatDropdown" class="dropdown-item" style="cursor:pointer">
Chat with AI about your health
</a>
</div>
Expand Down

0 comments on commit ae3263e

Please sign in to comment.