Story-Chatbot / app.js
realitycheckexp's picture
Add 4 files
6e901c1 verified
Raw
History Blame Contribute Delete
645 Bytes
function sendInput() {
let message = inputText.trim();
if (message!== '') {
chatLog.push(`You: ${message}`);
inputText = '';
let response = getResponse(message, storyTheme);
chatLog.push(`Bot: ${response}`);
}
}
function getResponse(input, theme) {
// Call Mixtral 7b API or implement your own logic here
// For demonstration purposes, return a random response
let responses = [
'That sounds interesting!',
'Can you tell me more about that?',
'Let\'s explore that idea further!',
'I\'m not sure I understand, can you clarify?',
];
return responses[Math.floor(Math.random() * responses.length)];
}