diff --git a/static/ips/assets/js/aiChat.js b/static/ips/assets/js/llmChat.js similarity index 93% rename from static/ips/assets/js/aiChat.js rename to static/ips/assets/js/llmChat.js index a79a11e3..62e37957 100644 --- a/static/ips/assets/js/aiChat.js +++ b/static/ips/assets/js/llmChat.js @@ -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'); @@ -55,4 +55,4 @@ function appendMessage(role, content) { chatMessages.scrollTop = chatMessages.scrollHeight; } -export { initAIChat }; +export { initLLMChat }; diff --git a/static/ips/assets/js/renderIPS.js b/static/ips/assets/js/renderIPS.js index 6816e965..c4be474c 100644 --- a/static/ips/assets/js/renderIPS.js +++ b/static/ips/assets/js/renderIPS.js @@ -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'; @@ -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() { @@ -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) { @@ -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); @@ -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(); diff --git a/static/ips/index.html b/static/ips/index.html index 34193438..d0051812 100644 --- a/static/ips/index.html +++ b/static/ips/index.html @@ -29,7 +29,7 @@ - + IPS Viewer @@ -98,7 +98,7 @@ Display text generated by IPS source - + Chat with AI about your health