Lagt till vidarebefordran av LLM från backen.py till frontend (index.html, client.html, frontend.js

This commit is contained in:
2024-07-29 00:47:42 +02:00
parent 534874e810
commit 941b426574
4 changed files with 20 additions and 18 deletions
+3
View File
@@ -18,9 +18,12 @@
<script>
// Extract apiEndpoint for use in your frontend code...
const apiEndpoint = '{{ api_endpoint }}'; // Templating syntax (Jinja2)
const useModel = '{{ use_model }}'; // Templating syntax (Jinja2)
// Tell the iframe about the apiEndpoing
document.getElementById('client-frame').contentWindow.apiEndpoint = apiEndpoint;
document.getElementById('client-frame').contentWindow.useModel = useModel;
console.log("index.html - API Endpoint: ", apiEndpoint);
console.log("index.html - use model: ", useModel);
</script>
<!-- Responsive scaling and some padding -->