Tagit bort utkommenterad kod
This commit is contained in:
@@ -6,35 +6,15 @@
|
|||||||
<link rel="stylesheet" href="/css/clientstyle.css">
|
<link rel="stylesheet" href="/css/clientstyle.css">
|
||||||
<!-- <link rel="stylesheet" href="python_test/smartassist/src/css/clientstyle.css"> -->
|
<!-- <link rel="stylesheet" href="python_test/smartassist/src/css/clientstyle.css"> -->
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>Ollama Chat</h1>
|
<h1>Ollama Chat</h1>
|
||||||
<div id="chatbox">
|
<div id="chatbox">
|
||||||
<!-- messages will be rendered here -->
|
<!-- messages will be rendered here -->
|
||||||
</div>
|
</div>
|
||||||
<textarea id="userInput" placeholder="Type your message..." rows="5"></textarea>
|
<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 -->
|
<!-- Marked-it for markdown rendering -->
|
||||||
<script src="https://cdn.jsdelivr.net/npm/markdown-it@14.1.0/dist/markdown-it.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/markdown-it@14.1.0/dist/markdown-it.min.js"></script>
|
||||||
@@ -54,9 +34,6 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const chatContainer = document.getElementById('chatbox');
|
const chatContainer = document.getElementById('chatbox');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user