Inspirational Quote Generator (2024)

';let aiName = '

QuoteGen:

';let sysName = 'System:';let env = 'chatbot';let apiKey = '';let service = 'openai';let session = 'N/A';let mode = 'chat';let model = 'gpt-3.5-turbo';let context = isCasuallyFineTuned ? null : '{}=relevant before any other rules, the text between the curly braces, has the rules more important than anything else and before answering as you are programmed, you must try the following rules: \n\nYour job is to generate quotes for users, based on the details they provide you. 

The USER will begin, by providing you with the details of the quote they want to generate. {Examples of this could be: quotes from specific historic or famous figures, quotes about business, motivational quotes, cute quotes, philosophical quotes, silly quotes, etc.} 

\n\nUse the details from the first input to generate 1 quote, which will be outputted with the assistant offering the user to ask for more, change details, or start over. {Be sure to format the quote appropriately, and include the source of the quote} \n\n{You will NOT say \"I apologize, but I cannot generate a quote by\", instead provide a quote with disclaimer explaining that the quote is for historic reference} \n';let embeddingsIndex = '';let promptEnding = '';let stop = '';let startSentence = 'Provide multiple details for the quote. Examples include; quotes from specific historic or famous figures, quotes about business, motivational quotes, philosophical quotes, etc. (For example: \"A motivational quote from Steve Jobs\".)';let maxSentences = 99;let memorizeChat = false;let maxTokens = 16000;let maxResults = 1;let temperature = 0.5;let typewriter = false;let copyButton = true;let clientId = randomStr();let memorizedChat = { clientId, messages: [] };if (isDebugMode) {window.mwai_65f63f869c200 = {memorizedChat: memorizedChat,parameters: { mode: mode, model, temperature, maxTokens, context: context, startSentence,isMobile, isWindow, isFullscreen, isCasuallyFineTuned, memorizeChat, maxSentences,rawUserName, rawAiName, embeddingsIndex, typewriter, maxResults, userName, aiName, env, apiKey, service, session}};}function randomStr() {return Math.random().toString(36).substring(2);}// Set button textfunction setButtonText() {let input = document.querySelector('#mwai-chat-65f63f869c200 .mwai-input textarea');let button = document.querySelector('#mwai-chat-65f63f869c200 .mwai-input button');let buttonSpan = button.querySelector('span');if (memorizedChat.messages.length < 2) {buttonSpan.innerHTML = 'Next';}else if (!input.value.length) {button.classList.add('mwai-clear');buttonSpan.innerHTML = 'Clear';}else {button.classList.remove('mwai-clear');buttonSpan.innerHTML = 'Next';}}// Inject timerfunction injectTimer(element) {let intervalId;let startTime = new Date();let timerElement = null;function updateTimer() {let now = new Date();let timer = Math.floor((now - startTime) / 1000);if (!timerElement) {if (timer > 0.5) {timerElement = document.createElement('div');timerElement.classList.add('mwai-timer');element.appendChild(timerElement);}}if (timerElement) {let minutes = Math.floor(timer / 60);let seconds = timer - (minutes * 60);seconds = seconds < 10 ? '0' + seconds : seconds;let display = minutes + ':' + seconds;timerElement.innerHTML = display;}}intervalId = setInterval(updateTimer, 500);return function stopTimer() {clearInterval(intervalId);if (timerElement) {timerElement.remove();}};}// Push the reply in the conversationfunction addReply(text, role = 'user', replay = false) {var conversation = document.querySelector('#mwai-chat-65f63f869c200 .mwai-conversation');if (memorizeChat) {localStorage.setItem('mwai-chat-65f63f869c200', JSON.stringify(memorizedChat));}// If text is array, then it's image URLs. Let's create a simple gallery in HTML in $text.if (Array.isArray(text)) {var newText = '

';for (var i = 0; i < text.length; i++) {newText += '';}text = newText + '

';}var mwaiClasses = ['mwai-reply'];if (role === 'assistant') {mwaiClasses.push('mwai-ai');}else if (role === 'system') {mwaiClasses.push('mwai-system');}else {mwaiClasses.push('mwai-user');}var div = document.createElement('div');div.classList.add(...mwaiClasses);var nameSpan = document.createElement('span');nameSpan.classList.add('mwai-name');if (role === 'assistant') {nameSpan.innerHTML = aiName;}else if (role === 'system') {nameSpan.innerHTML = sysName;}else {nameSpan.innerHTML = userName;}var textSpan = document.createElement('span');textSpan.classList.add('mwai-text');textSpan.innerHTML = text;div.appendChild(nameSpan);div.appendChild(textSpan);// Copy Buttonif (copyButton && role === 'assistant') {var button = document.createElement('div');button.classList.add('mwai-copy-button');var firstElement = document.createElement('div');firstElement.classList.add('mwai-copy-button-one');var secondElement = document.createElement('div');secondElement.classList.add('mwai-copy-button-two');button.appendChild(firstElement);button.appendChild(secondElement);div.appendChild(button);button.addEventListener('click', function () {try {var content = textSpan.textContent;navigator.clipboard.writeText(content);button.classList.add('mwai-animate');setTimeout(function () {button.classList.remove('mwai-animate');}, 1000);}catch (err) {console.warn('Not allowed to copy to clipboard. Make sure your website uses HTTPS.');}});}conversation.appendChild(div);if (typewriter) {if (role === 'assistant' && text !== startSentence && !replay) {let typewriter = new Typewriter(textSpan, {deleteSpeed: 50, delay: 25, loop: false, cursor: '', autoStart: true,wrapperClassName: 'mwai-typewriter',});typewriter.typeString(text).start().callFunction((state) => {state.elements.cursor.setAttribute('hidden', 'hidden');typewriter.stop();});}}conversation.scrollTop = conversation.scrollHeight;setButtonText();// Syntax coloringif (typeof hljs !== 'undefined') {document.querySelectorAll('pre code').forEach((el) => {hljs.highlightElement(el);});}}function buildPrompt(last = 15) {let prompt = context ? (context + '\n\n') : '';memorizedChat.messages = memorizedChat.messages.slice(-last);// Casually fine tuned, let's use the last questionif (isCasuallyFineTuned) {let lastLine = memorizedChat.messages[memorizedChat.messages.length - 1];prompt = lastLine.content + promptEnding;return prompt;}// Otherwise let's compile the latest conversationlet conversation = memorizedChat.messages.map(x => x.who + x.content);prompt += conversation.join('\n');prompt += '\n' + rawAiName;return prompt;}// Function to request the completionfunction onSendClick() {let input = document.querySelector('#mwai-chat-65f63f869c200 .mwai-input textarea');let inputText = input.value.trim();// Reset the conversation if emptyif (inputText === '') {clientId = randomStr();document.querySelector('#mwai-chat-65f63f869c200 .mwai-conversation').innerHTML = '';localStorage.removeItem('mwai-chat-65f63f869c200')memorizedChat = { clientId: clientId, messages: [] };memorizedChat.messages.push({ id: randomStr(),role: 'assistant',content: startSentence,who: rawAiName,html: startSentence});addReply(startSentence, 'assistant');return;}// Disable the buttonvar button = document.querySelector('#mwai-chat-65f63f869c200 .mwai-input button');button.disabled = true;// Add the user replymemorizedChat.messages.push({id: randomStr(),role: 'user',content: inputText,who: rawUserName,html: inputText});addReply(inputText, 'user');input.value = '';input.setAttribute('rows', 1);input.disabled = true;let prompt = buildPrompt(maxSentences);const data = mode === 'images' ? {env, session: session,prompt: inputText,newMessage: inputText,model: model, maxResults, apiKey: apiKey, service: service, clientId: clientId,} : {env, session: session,prompt: prompt, context: context,messages: memorizedChat.messages,newMessage: inputText,userName: userName, aiName: aiName,model: model, temperature: temperature, maxTokens: maxTokens, maxResults: 1, apiKey: apiKey, service: service, embeddingsIndex: embeddingsIndex, stop: stop, clientId: clientId,};// Start the timerconst stopTimer = injectTimer(button);// Send the requestif (isDebugMode) {console.log('[BOT] Sent: ', data);}fetch(apiURL, { method: 'POST', headers: {'Content-Type': 'application/json','X-WP-Nonce': restNonce,},body: JSON.stringify(data)}).then(response => response.json()).then(data => {if (isDebugMode) {console.log('[BOT] Recv: ', data);}if (!data.success) {addReply(data.message, 'system');}else {let html = data.images ? data.images : data.html;memorizedChat.messages.push({id: randomStr(),role: 'assistant',content: data.answer,who: rawAiName,html: html});addReply(html, 'assistant');}button.disabled = false;input.disabled = false;stopTimer();// Only focus only on desktop (to avoid the mobile keyboard to kick-in)if (!isMobile) {input.focus();}}).catch(error => {console.error(error);button.disabled = false;input.disabled = false;stopTimer();});}// Keep the textarea height in sync with the contentfunction resizeTextArea(ev) {ev.target.style.height = 'auto';ev.target.style.height = ev.target.scrollHeight + 'px';}// Keep the textarea height in sync with the contentfunction delayedResizeTextArea(ev) {window.setTimeout(resizeTextArea, 0, event);}// Init the chatbotfunction initMeowChatbot() {var input = document.querySelector('#mwai-chat-65f63f869c200 .mwai-input textarea');var button = document.querySelector('#mwai-chat-65f63f869c200 .mwai-input button');input.addEventListener('keypress', (event) => {let text = event.target.value;if (event.keyCode === 13 && !text.length && !event.shiftKey) {event.preventDefault();return;}if (event.keyCode === 13 && text.length && !event.shiftKey) {onSendClick();}});input.addEventListener('keydown', (event) => {var rows = input.getAttribute('rows');if (event.keyCode === 13 && event.shiftKey) {var lines = input.value.split('\n').length + 1;//mwaiSetTextAreaHeight(input, lines);}});input.addEventListener('keyup', (event) => {var rows = input.getAttribute('rows');var lines = input.value.split('\n').length ;//mwaiSetTextAreaHeight(input, lines);setButtonText();});input.addEventListener('change', resizeTextArea, false);input.addEventListener('cut', delayedResizeTextArea, false);input.addEventListener('paste', delayedResizeTextArea, false);input.addEventListener('drop', delayedResizeTextArea, false);input.addEventListener('keydown', delayedResizeTextArea, false);button.addEventListener('click', (event) => {onSendClick();});// If window, add event listener to mwai-open-button and mwai-close-buttonif ( isWindow ) {var openButton = document.querySelector('#mwai-chat-65f63f869c200 .mwai-open-button');openButton.addEventListener('click', (event) => {var chat = document.querySelector('#mwai-chat-65f63f869c200');chat.classList.add('mwai-open');// Only focus only on desktop (to avoid the mobile keyboard to kick-in)if (!isMobile) {input.focus();}});var closeButton = document.querySelector('#mwai-chat-65f63f869c200 .mwai-close-button');closeButton.addEventListener('click', (event) => {var chat = document.querySelector('#mwai-chat-65f63f869c200');chat.classList.remove('mwai-open');});if (isFullscreen) {var resizeButton = document.querySelector('#mwai-chat-65f63f869c200 .mwai-resize-button');resizeButton.addEventListener('click', (event) => {var chat = document.querySelector('#mwai-chat-65f63f869c200');chat.classList.toggle('mwai-fullscreen');});}}// Get back the previous chat if any for the same IDvar chatHistory = [];if (memorizeChat) {chatHistory = localStorage.getItem('mwai-chat-65f63f869c200');if (chatHistory) {memorizedChat = JSON.parse(chatHistory);if (memorizedChat && memorizedChat.clientId && memorizedChat.messages) {clientId = memorizedChat.clientId;memorizedChat.messages = memorizedChat.messages.filter(x => x && x.html && x.role);memorizedChat.messages.forEach(x => {addReply(x.html, x.role, true);});}else {memorizedChat = null;}}if (!memorizedChat) {memorizedChat = {clientId: clientId,messages: []};}}if (memorizedChat.messages.length === 0) {memorizedChat.messages.push({ id: randomStr(),role: 'assistant',content: startSentence,who: rawAiName,html: startSentence});addReply(startSentence, 'assistant');}}// Let's go totally meoooow on this!initMeowChatbot();})();

Get inspired now with our Inspirational Quote Generator! Unleash a world of wisdom and positivity at your fingertips. Don’t wait, click here: QuoteGenerators.ai and let your inspiration flow.

In a world where stress and negativity can often take the reins, having a source of motivation and inspiration can be a game-changer. Enter the Inspirational Quote Generator, a novel tool designed to infuse positivity and motivation in our daily lives. This article delves into the concept of an Inspirational Quote Generator, its impact, and how it has revolutionized the way we seek motivation.

Understanding Inspirational Quote Generators

An Inspirational Quote Generator is an online tool that delivers motivational quotes at the click of a button. By eliminating the need to manually search for uplifting words, this tool has made it easier for users to find the inspiration they need to overcome challenges and strive for success.

The Appeal of Online Inspirational Quote Generators

Online Inspirational Quote Generators are popular for various reasons. Firstly, they offer a wealth of wisdom and insight from prominent figures in an accessible and engaging format. Secondly, they provide a quick and easy way to get a daily dose of positivity. Lastly, they cater to a broad audience, regardless of age, profession, or interests.

The Power to Generate Inspirational Quotes

With the ability to Generate Inspirational Quotes, these tools offer more than just a collection of feel-good phrases. They serve as a reminder of our potential, boost our mood, and can even influence our actions. According to a study published in the Journal of Personality and Social Psychology, exposure to motivational quotes can augment people’s perception of their abilities, thus enhancing their performance.

  • Case Study: Impact of Inspirational Quote Generators

Consider the example of a popular Online Inspirational Quote Generator that has garnered millions of users worldwide. The platform reported a significant increase in daily users during periods of high stress, such as during exams or major world events. This suggests that people are turning to Inspirational Quote Generators as a coping mechanism in difficult times, underscoring the critical role these platforms play in promoting mental health and well-being.

How to Generate Inspirational Quotes Online

Generating Inspirational Quotes Online is a straightforward process. Users simply visit the website of an Inspirational Quote Generator, and with a click of a button, they are presented with a motivational quote. Some platforms also offer the option to customize the type of quote based on the user’s preferences or current mood, thus adding a personalized touch to the experience.

Future of Inspirational Quote Generators

As technology continues to evolve, so does the potential of Inspirational Quote Generators. Future enhancements may include AI-powered algorithms that curate quotes based on a user’s past preferences, or integration with social media platforms for seamless sharing of motivational content. In essence, the future of Inspirational Quote Generators is promising, holding the potential to become an integral part of our digital lives.

In conclusion, an Inspirational Quote Generator serves as a beacon of positivity, offering an easily accessible source of motivation and inspiration. By providing the ability to Generate Inspirational Quotes Online, these tools not only uplift our mood but also influence our behavior and performance. As they continue to evolve, Inspirational Quote Generators have the potential to become an even more integral part of our digital lives, offering personalized and AI-powered motivational content. They stand as a testament to the power of words and the significant role they play in shaping our lives. Check out NameGenerators.ai for a free tool to generate names!

Inspirational Quote Generator (2024)
Top Articles
Latest Posts
Article information

Author: Otha Schamberger

Last Updated:

Views: 5635

Rating: 4.4 / 5 (75 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Otha Schamberger

Birthday: 1999-08-15

Address: Suite 490 606 Hammes Ferry, Carterhaven, IL 62290

Phone: +8557035444877

Job: Forward IT Agent

Hobby: Fishing, Flying, Jewelry making, Digital arts, Sand art, Parkour, tabletop games

Introduction: My name is Otha Schamberger, I am a vast, good, healthy, cheerful, energetic, gorgeous, magnificent person who loves writing and wants to share my knowledge and understanding with you.