Arbetar med att göra externt skapade variabler tillgängliga. Safari krävre annnan hantering än övriga webläsare
This commit is contained in:
@@ -10,11 +10,8 @@ const parser = window.markdownit({
|
||||
|
||||
parser.enable(['table']);
|
||||
|
||||
|
||||
// const html = markdownIt.use({
|
||||
// // You can customize the parser options here, e.g., enable/disable certain features
|
||||
// });
|
||||
|
||||
console.log("frontend.js - API Endpoint: ", apiEndpoint);
|
||||
console.log("frontend.js - use model: ", useModel);
|
||||
|
||||
// Define a function to send the user's message to the AI
|
||||
function sendMessage() {
|
||||
@@ -24,10 +21,11 @@ function sendMessage() {
|
||||
// Check if the message is not empty
|
||||
if (query !== '') {
|
||||
|
||||
fetch(`${apiEndpoint}`, {
|
||||
// fetch(`${apiEndpoint}`, {
|
||||
fetch(apiEndpoint, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ query, model: `${useModel}` }), // Add these parameters here
|
||||
body: JSON.stringify({ query, model: useModel }), // Add these parameters here
|
||||
// body: JSON.stringify({ query, url_server: "http://your-custom-url", model: "phi3:mini" }), // Add these parameters here
|
||||
})
|
||||
.then(response => response.json())
|
||||
|
||||
Reference in New Issue
Block a user