Character Name Generator (2024)

';let aiName = '

NameGenAI:

';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 a list of names for users based on the details they provide you. 

The USER will begin, by providing you with the type of name they want to generate. {Examples of this could be: baby names, business names, pet names, book names, fantasy names, etc.}\n\n 

Use the response from the first input to inform the follow-up question: \"That\'s great. Can you provide me with any specific details or characteristics that you\'d like your {item} name to include?” {This could be things like certain letters or sounds, themes, meanings, language or cultural regions, etc.} \n\nOnce the user responds with details or nothing, a list of 10 names will be outputted with the assistant offering the user to ask for more, make changes, add details or start over. ';let embeddingsIndex = '';let promptEnding = '';let stop = '';let startSentence = 'Specify the type of name. For example you can generate; baby names, business names, pet names, book names, fantasy names, and all types of other names.';let maxSentences = 99;let memorizeChat = false;let maxTokens = 16000;let maxResults = 1;let temperature = 1;let typewriter = false;let copyButton = true;let clientId = randomStr();let memorizedChat = { clientId, messages: [] };if (isDebugMode) {window.mwai_65d41c6fb4401 = {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-65d41c6fb4401 .mwai-input textarea');let button = document.querySelector('#mwai-chat-65d41c6fb4401 .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-65d41c6fb4401 .mwai-conversation');if (memorizeChat) {localStorage.setItem('mwai-chat-65d41c6fb4401', 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-65d41c6fb4401 .mwai-input textarea');let inputText = input.value.trim();// Reset the conversation if emptyif (inputText === '') {clientId = randomStr();document.querySelector('#mwai-chat-65d41c6fb4401 .mwai-conversation').innerHTML = '';localStorage.removeItem('mwai-chat-65d41c6fb4401')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-65d41c6fb4401 .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-65d41c6fb4401 .mwai-input textarea');var button = document.querySelector('#mwai-chat-65d41c6fb4401 .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-65d41c6fb4401 .mwai-open-button');openButton.addEventListener('click', (event) => {var chat = document.querySelector('#mwai-chat-65d41c6fb4401');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-65d41c6fb4401 .mwai-close-button');closeButton.addEventListener('click', (event) => {var chat = document.querySelector('#mwai-chat-65d41c6fb4401');chat.classList.remove('mwai-open');});if (isFullscreen) {var resizeButton = document.querySelector('#mwai-chat-65d41c6fb4401 .mwai-resize-button');resizeButton.addEventListener('click', (event) => {var chat = document.querySelector('#mwai-chat-65d41c6fb4401');chat.classList.toggle('mwai-fullscreen');});}}// Get back the previous chat if any for the same IDvar chatHistory = [];if (memorizeChat) {chatHistory = localStorage.getItem('mwai-chat-65d41c6fb4401');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();})();

Discover inspiration for your next story, game or project with a unique and creative character name. Use our Character Name Generator today! Visit NameGenerators.ai to get started.

When creating a fictional character for a novel, videogame, role-playing game, or even a screenplay, one of the most challenging tasks can be coming up with a suitable name. The name of a character plays a vital role in their personality and how they are perceived by users or readers. A character’s name can provide insight into their personality, background, and purpose. To assist in this creative process, a tool called a Character Name Generator can be invaluable. This tool offers an array of unique and interesting names for a wide range of characters.

The Purpose Of A Character Name Generator

A Character Name Generator is an online tool typically used by writers, gamers, and creators to fabricate meaningful and distinct names for their characters. These generators offer a great variety of names derived from different languages, cultures, and epochs, depending on the creator’s preferences and the character’s backdrop.

Naming a character can be time-consuming and at times, even overwhelming. Coming up with a name that embodies the character’s traits and background while being unique and memorable can be challenging. An Online Character Name Generator simplifies this process by providing an assortment of pre-generated names based on specified inputs.

How Character Name Generators Work

A Character Name Generator works by using algorithms that mix and match different syllables, words, and letters to create unique names. The user typically provides inputs such as gender, genre, nationality, language, and sometimes even era, which then influence the names produced by the generator. Some Character Name Generators even have options to generate surnames or full names, further adding a depth of realism to your characters.

Benefits of Using an Online Character Name Generator

Using a Character Name Generator comes with several benefits:

  • Time-Saving: Coming up with a fitting name can take hours of brainstorming. These generators can provide options in mere seconds, freeing you to focus more on character development.
  • Variety: These generators include names from various cultures and languages, providing a vast array that you may not have thought of.
  • Inspiration: Even if you don’t use the exact name generated, it can provide inspiration or a starting point for a name that suits your character perfectly.

Popular Online Character Name Generators

There are numerous Online Character Name Generators available with different features to cater to your creative needs. Here are a few examples:

  • Behind The Name: This generator creates names for characters of different nationalities. It also provides information on the meaning and origin of the name.
  • Fantasy Name Generators: This generator offers a variety, from common English names, to more unique and fantastical options. It caters well for sci-fi, fantasy, and other niche genres.
  • NameGenerator: This tool provides both first names and surnames, ideal for contemporary settings or realistic fiction.

Considerations When Using a Character Name Generator

While Character Name Generators can be handy tools, it’s crucial to use them wisely. Consider a character’s background, personality, and role in the story, and ensure the generated name matches these elements. Remember that while these generators can provide inspiration, the final decision always rests with the creator.

Character Name Generators can be a valuable tool in the creative process, providing a wealth of inspiration and saving you time along the way. While these tools can be incredibly helpful, it’s important to remember that naming a character is a pivotal part of character creation and should be carefully considered. Online Character Name Generators are an excellent starting point to help your character come alive and bring them one step closer to resonating uniquely with your audience. If you need to generate posts, try postgenerator.ai

Character Name Generator (2024)

References

Top Articles
Latest Posts
Article information

Author: Ray Christiansen

Last Updated:

Views: 6308

Rating: 4.9 / 5 (69 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Ray Christiansen

Birthday: 1998-05-04

Address: Apt. 814 34339 Sauer Islands, Hirtheville, GA 02446-8771

Phone: +337636892828

Job: Lead Hospitality Designer

Hobby: Urban exploration, Tai chi, Lockpicking, Fashion, Gunsmithing, Pottery, Geocaching

Introduction: My name is Ray Christiansen, I am a fair, good, cute, gentle, vast, glamorous, excited person who loves writing and wants to share my knowledge and understanding with you.