Tagit bort utkommenterad kod

This commit is contained in:
Joakim Persson
2024-07-31 17:36:37 +02:00
parent 9203641e6a
commit 810b369721
+2 -25
View File
@@ -6,35 +6,15 @@
<link rel="stylesheet" href="/css/clientstyle.css">
<!-- <link rel="stylesheet" href="python_test/smartassist/src/css/clientstyle.css"> -->
</head>
<body>
<h1>Ollama Chat</h1>
<div id="chatbox">
<!-- messages will be rendered here -->
</div>
<textarea id="userInput" placeholder="Type your message..." rows="5"></textarea>
<button id="sendButton" onclick="sendMessage()">Send</button>
<button id="sendButton" onclick="window.frontendApi.sendMessage()">Send</button>
<!-- Get the apiEndpoint and the useModel -->
<!-- <script>
const apiEndpoint = window.apiEndpoint;
const useModel = window.useModel;
console.log("client.html - API Endpoint: ", apiEndpoint);
console.log("client.html - use model: ", useModel);
</script> -->
<!-- <script>
let apiEndpoint; // Make variable available outside of the scope of the event listener
let useModel; // Make variable available outside of the scope of the event listener
window.addEventListener('message', function(event) {
if (event.origin === 'http://localhost:5004') { // Make sure this matches your origin
const { apiEndpoint, useModel } = event.data;
console.log("client.html - API Endpoint: ", apiEndpoint);
console.log("client.html - use model: ", useModel);
window.apiEndpoint = apiEndpoint;
window.useModel = useModel;
}
});
</script> -->
<!-- Marked-it for markdown rendering -->
<script src="https://cdn.jsdelivr.net/npm/markdown-it@14.1.0/dist/markdown-it.min.js"></script>
@@ -54,9 +34,6 @@
};
</script>
<script>
const chatContainer = document.getElementById('chatbox');