<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-351024856889166003</id><updated>2026-04-29T15:45:12.774-07:00</updated><title type='text'>GDnetwork</title><subtitle type='html'>&lt;a href=&quot;http://gdnetworkjob2013.blogspot.in/2012/12/rachael-lynn-one-of-kind-music-video.html&quot;&gt;&#xa;video|&lt;/a&gt;&#xa;&#xa;&lt;a href=&quot;http://gdnetworkjob2013.blogspot.in&quot;&gt;&lt;/a&gt;&#xa;&#xa;&lt;a href=&quot;http://gdnetworkjob2013.blogspot.in/2013/13/.html&quot;&gt;BEST PTC SITES&lt;/a&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://gdnetworkjob2013.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/351024856889166003/posts/default'/><link rel='alternate' type='text/html' href='https://gdnetworkjob2013.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>}}}}Get yuer Dreem{{{{</name><uri>http://www.blogger.com/profile/06857196246338152083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><blogger:adultContent>true</blogger:adultContent><entry><id>tag:blogger.com,1999:blog-351024856889166003.post-3240438329656346955</id><published>2026-04-29T12:25:00.000-07:00</published><updated>2026-04-29T12:25:47.864-07:00</updated><title type='text'></title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;

	&lt;head&gt;
		&lt;meta charset=&quot;UTF-8&quot;&gt;
		&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
		&lt;title&gt;ChatGPT-Like Text Generation&lt;/title&gt;
		&lt;script src=&quot;https://code.jquery.com/jquery-3.6.4.min.js&quot;&gt;&lt;/script&gt;
		&lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css&quot;&gt;

		&lt;style&gt;
			.regenerateIcon {
				cursor: pointer;
				display: inline-block;
				margin-left: 10px;
				font-size: 20px;
				/* Adjust size as needed */
			}

		
			#chatContainer {
				background-color: #fff;
				border-radius: 8px;
				overflow: hidden;
				width: 100%;
				max-width: 800px;
				margin: auto;
				box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
			}



			#chatHeader {
				width: 100%;
				padding: 10px;
				margin-bottom: 20px;
				border-radius: 8px;
				border: none;
				color: white;
				text-align: center;
				font-size: 16px;

				cursor: pointer;
				background-image: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
				transition: all 0.3s ease;
				text-decoration: none;
				/* Remove underline from download link */
				display: inline-block;
				/* Needed for anchor to behave like a button */
				text-align: center;
				/* Ensure text is centered in download link */
			}

			#chatBody {
				padding: 20px;
				max-height: 300px;
				overflow-y: auto;
			}

			.messageContainer {
				display: flex;
				justify-content: flex-end;
				margin-bottom: 10px;
			}

			.message {
				background-color: #e2f0cb;
				padding: 10px;
				border-radius: 5px;
				max-width: 70%;
				word-wrap: break-word;
			}

			#prompt {
				width: calc(100% - 40px - 20px);
				margin: 10px 20px;
				padding: 12px;
				border-radius: 5px;
				border: 1px solid #ccc;
			}

			button {
				width: 95%;
				padding: 10px;
				margin-bottom: 20px;
				border-radius: 8px;
				border: none;
				color: white;
				text-align: center;
				font-size: 16px;
				margin-left: 20px;
				cursor: pointer;
				background-image: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
				transition: all 0.3s ease;
				text-decoration: none;
				/* Remove underline from download link */
				display: inline-block;
				/* Needed for anchor to behave like a button */
				text-align: center;
				/* Ensure text is centered in download link */
			}

			button:hover {
				transform: translateY(-2px);
				box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
			}

			#copyButton {
				background-color: #007bff;
			}

			#progressOverlay {
				display: none;
				position: fixed;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				background: rgba(0, 0, 0, 0.5);
				z-index: 1000;
			}

			#progressOverlay &gt; div {
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -50%);
				color: white;
				font-size: 20px;
			}

			/* Add styles for formatted text */
			.formatted-text {
				white-space: pre-wrap;
				/* Keeps white space and line breaks */
			}

			.formatted-text a {
				color: #007bff;
				text-decoration: none;
			}

			.formatted-text a:hover {
				text-decoration: underline;
			}

			/* Dropdown Styles */
			#typeSelection,
			#languageSelection {
				width: calc(50% - 25px);
				/* Adjust width to fit side by side with some space */
				padding: 10px;
				margin: 10px;
				border-radius: 5px;
				border: 1px solid #ccc;
				background-color: #fff;
				font-family: &#39;Arial&#39;, sans-serif;
				font-size: 16px;
				box-sizing: border-box;
				/* Ensure padding and border are included in width */
				display: inline-block;
				/* Display side by side */
				cursor: pointer;
			}

			#typeSelection:disabled,
			#languageSelection:disabled {
				background-color: #e9ecef;
				cursor: not-allowed;
			}

			/* Adjust margin for the prompt to align with the new dropdowns */
			#prompt {
				margin: 0 10px 10px 10px;
			}

			/* Style adjustments for button to align with the new layout */
			button {
				width: calc(100% - 40px);
				margin: 10px;
			}

			/* Ensure the container width accommodates new elements */
			#chatContainer {
				padding-bottom: 10px;
				/* Add some padding at the bottom */
			}

			.message.code {
				background-color: #f5f5f5;
				/* Light grey background */
				color: #333;
				/* Darker text for contrast */
				font-family: monospace;
				/* Monospace font for code-like appearance */
				white-space: pre-wrap;
				/* Allows text to wrap and preserves formatting */
				word-wrap: break-word;
				/* Allows long lines to break and wrap to the next line */
				padding: 10px;
				/* Padding inside the preformatted text block */
				border-radius: 5px;
				/* Rounded corners like other messages */
			}
		&lt;/style&gt;
	&lt;/head&gt;

	&lt;body&gt;

		&lt;div id=&quot;chatContainer&quot;&gt;
			&lt;div id=&quot;chatHeader&quot;&gt;ChatGPT&lt;/div&gt;

			&lt;!-- Dropdown for Text or Code selection --&gt;
			&lt;select id=&quot;typeSelection&quot;&gt;
				&lt;option value=&quot;text&quot;&gt;Text&lt;/option&gt;
				&lt;option value=&quot;code&quot;&gt;Code&lt;/option&gt;
			&lt;/select&gt;

			&lt;!-- Dropdown for Indian Languages selection --&gt;
			&lt;select id=&quot;languageSelection&quot;&gt;
				&lt;option value=&quot;&quot;&gt;Select Language&lt;/option&gt;
				&lt;option value=&quot;Assamese&quot;&gt;Assamese&lt;/option&gt;
				&lt;option value=&quot;Bengali&quot;&gt;Bengali&lt;/option&gt;
				&lt;option value=&quot;Gujarati&quot;&gt;Gujarati&lt;/option&gt;
				&lt;option value=&quot;Hindi&quot;&gt;Hindi&lt;/option&gt;
				&lt;option value=&quot;Kannada&quot;&gt;Kannada&lt;/option&gt;
				&lt;option value=&quot;Kashmiri&quot;&gt;Kashmiri&lt;/option&gt;
				&lt;option value=&quot;Konkani&quot;&gt;Konkani&lt;/option&gt;
				&lt;option value=&quot;Malayalam&quot;&gt;Malayalam&lt;/option&gt;
				&lt;option value=&quot;Marathi&quot;&gt;Marathi&lt;/option&gt;
				&lt;option value=&quot;Nepali&quot;&gt;Nepali&lt;/option&gt;
				&lt;option value=&quot;Odia&quot;&gt;Odia&lt;/option&gt;
				&lt;option value=&quot;Punjabi&quot;&gt;Punjabi&lt;/option&gt;
				&lt;option value=&quot;Sanskrit&quot;&gt;Sanskrit&lt;/option&gt;
				&lt;option value=&quot;Sindhi&quot;&gt;Sindhi&lt;/option&gt;
				&lt;option value=&quot;Tamil&quot;&gt;Tamil&lt;/option&gt;
				&lt;option value=&quot;Telugu&quot;&gt;Telugu&lt;/option&gt;
				&lt;option value=&quot;Urdu&quot;&gt;Urdu&lt;/option&gt;

				&lt;!-- Add more Indian languages as needed --&gt;
			&lt;/select&gt;
			&lt;div id=&quot;chatBody&quot;&gt;&lt;/div&gt;
			&lt;textarea id=&quot;prompt&quot; placeholder=&quot;Type a message...&quot; rows=&quot;3&quot;&gt;&lt;/textarea&gt;
			&lt;div class=&quot;vertical-center&quot;&gt;
				&lt;button id=&quot;generateButton&quot; onclick=&quot;generateText()&quot;&gt;Generate Text&lt;/button&gt;
			&lt;/div&gt;

		&lt;/div&gt;

		&lt;div id=&quot;progressOverlay&quot;&gt;
			&lt;div&gt;Thinking...&lt;/div&gt;
		&lt;/div&gt;
		&lt;script src=&quot;https://code.jquery.com/jquery-3.6.0.min.js&quot;&gt;&lt;/script&gt;
		&lt;script&gt;
			$(document).ready(function() {
				// Handle generate button click
				$(&#39;#generateButton&#39;).click(function() {
					var userInput = $(&quot;#prompt&quot;).val().trim();
					if (userInput !== &quot;&quot;) {
						displayUserMessage(userInput); // Display the user message in the chatbox
						generateText(userInput, false); // Generate text with the user input
					}
				});

				// Handle changes in the type selection dropdown
				$(&#39;#typeSelection&#39;).change(function() {
					if ($(this).val() === &#39;code&#39;) {
						$(&#39;#languageSelection&#39;).prop(&#39;disabled&#39;, true).val(&#39;&#39;); // Reset and disable language selection
					} else {
						$(&#39;#languageSelection&#39;).prop(&#39;disabled&#39;, false);
					}
				});
			});

			function generateText(regenerate = false) {
				var prompt = regenerate ? lastPrompt : $(&quot;#prompt&quot;).val(); // Use the last prompt if regenerating

				// Append language description if applicable
				if (!regenerate) {
					var languageDescription = getLanguageDescription();
					if (languageDescription !== &quot;&quot; &amp;&amp; $(&#39;#typeSelection&#39;).val() === &#39;text&#39;) {
						prompt += &quot; &quot; + languageDescription; // Append language description to the user&#39;s input
					}
					lastPrompt = prompt; // Update lastPrompt with the language description
				}

				// Display the user&#39;s message in the chat body
				if (prompt.trim() !== &quot;&quot;) {
					$(&#39;#chatBody&#39;).append(&#39;&lt;div class=&quot;messageContainer userMessage&quot;&gt;&lt;div class=&quot;message&quot;&gt;&#39; + escapeHtml(prompt) + &#39;&lt;/div&gt;&lt;/div&gt;&#39;);
					$(&quot;#prompt&quot;).val(&quot;&quot;); // Clear the user input field only for new prompts
					$(&#39;#chatBody&#39;).scrollTop($(&#39;#chatBody&#39;)[0].scrollHeight); // Scroll to the bottom of the chat body

					$(&#39;#progressOverlay&#39;).show(); // Show the progress overlay
					  // how to get API key
                                                                        // https://allfreestore.com/wp-content/uploads/2024/03/Get%20OpenAI%20API%20Key.mp4
				var apiKey = &#39;your_api_key&#39;; // Replace with your actual OpenAI API key
					var apiUrl = &#39;https://api.openai.com/v1/chat/completions&#39;;
					var requestBody = {
						model: &#39;gpt-3.5-turbo&#39;,
						messages: [{
							role: &#39;user&#39;,
							content: prompt
						}],
						temperature: 0.7
					};

					$.ajax({
						type: &#39;POST&#39;,
						url: apiUrl,
						headers: {
							&#39;Content-Type&#39;: &#39;application/json&#39;,
							&#39;Authorization&#39;: &#39;Bearer &#39; + apiKey
						},
						data: JSON.stringify(requestBody),
						success: function(response) {
							$(&#39;#progressOverlay&#39;).hide(); // Hide the progress overlay
							// Conditionally display the response based on the user selection
							if ($(&#39;#typeSelection&#39;).val() === &#39;code&#39;) {
								// Display the response as preformatted text for code, escaping HTML to show as plain text
								$(&#39;#chatBody&#39;).append(&#39;&lt;div class=&quot;messageContainer&quot;&gt;&lt;pre class=&quot;message code&quot;&gt;&#39; + escapeHtml(response.choices[0].message.content) + &#39;&lt;/pre&gt;&lt;/div&gt;&#39;);
							} else {
								// Use typewriter effect for non-code text
								addTypewriterEffect(response.choices[0].message.content, &#39;chatBody&#39;);
							}
							$(&#39;#chatBody&#39;).scrollTop($(&#39;#chatBody&#39;)[0].scrollHeight); // Scroll to show the latest message
						},
						error: function(error) {
							$(&#39;#progressOverlay&#39;).hide(); // Hide the progress overlay on error
							console.error(&#39;Could not generate text:&#39;, error);
						}
					});
				}
			}

			// Function to escape HTML characters
			function escapeHtml(text) {
				return text
					.replace(/&amp;/g, &quot;&amp;amp;&quot;)
					.replace(/&lt;/g, &quot;&amp;lt;&quot;)
					.replace(/&gt;/g, &quot;&amp;gt;&quot;)
					.replace(/&quot;/g, &quot;&amp;quot;&quot;)
					.replace(/&#39;/g, &quot;&amp;#039;&quot;);
			}


			// Function to display the user&#39;s message in the chatbox
			function displayUserMessage(message) {
				var userMessageHtml = &#39;&lt;div class=&quot;messageContainer userMessage&quot;&gt;&lt;div class=&quot;message&quot;&gt;&#39; + message + &#39;&lt;/div&gt;&lt;/div&gt;&#39;;
				$(&#39;#chatBody&#39;).append(userMessageHtml);
				$(&quot;#prompt&quot;).val(&#39;&#39;); // Clear the input field
			}

			// Function to get the language description based on the selected language
			function getLanguageDescription() {
				var selectedLanguage = $(&#39;#languageSelection&#39;).val();
				var languageDescription = &quot;&quot;;
				switch (selectedLanguage) {
					case &quot;Assamese&quot;:
						languageDescription = &quot;in Assamese language&quot;;
						break;
					case &quot;Bengali&quot;:
						languageDescription = &quot;in Bengali language&quot;;
						break;
					case &quot;Gujarati&quot;:
						languageDescription = &quot;in Gujarati language&quot;;
						break;
					case &quot;Hindi&quot;:
						languageDescription = &quot;in Hindi language&quot;;
						break;
					case &quot;Kannada&quot;:
						languageDescription = &quot;in Kannada language&quot;;
						break;
					case &quot;Kashmiri&quot;:
						languageDescription = &quot;in Kashmiri language&quot;;
						break;
					case &quot;Konkani&quot;:
						languageDescription = &quot;in Konkani language&quot;;
						break;
					case &quot;Malayalam&quot;:
						languageDescription = &quot;in Malayalam language&quot;;
						break;
					case &quot;Marathi&quot;:
						languageDescription = &quot;in Marathi language&quot;;
						break;
					case &quot;Nepali&quot;:
						languageDescription = &quot;in Nepali language&quot;;
						break;
					case &quot;Odia&quot;:
						languageDescription = &quot;in Odia language&quot;;
						break;
					case &quot;Punjabi&quot;:
						languageDescription = &quot;in Punjabi language&quot;;
						break;
					case &quot;Sanskrit&quot;:
						languageDescription = &quot;in Sanskrit language&quot;;
						break;
					case &quot;Sindhi&quot;:
						languageDescription = &quot;in Sindhi language&quot;;
						break;
					case &quot;Tamil&quot;:
						languageDescription = &quot;in Tamil language&quot;;
						break;
					case &quot;Telugu&quot;:
						languageDescription = &quot;in Telugu language&quot;;
						break;
					case &quot;Urdu&quot;:
						languageDescription = &quot;in Urdu language&quot;;
						break;
					case &quot;English&quot;:
						languageDescription = &quot;in English language&quot;;
						break;
						// Add more cases as needed
				}

				return languageDescription;
			}


			function addTypewriterEffect(text, elementId) {
				var formattedText = formatResponseText(text);
				var container = $(&#39;&lt;div class=&quot;messageContainer&quot;&gt;&lt;/div&gt;&#39;).appendTo(&#39;#&#39; + elementId);
				var message = $(&#39;&lt;div class=&quot;message formatted-text&quot; style=&quot;background-color: #f5f5f5;&quot;&gt;&lt;/div&gt;&#39;).appendTo(container);

				var i = 0;
				var speed = 10; // Typing speed in milliseconds

				function typeWriter() {
					if (i &lt; formattedText.length) {
						var charToAdd = formattedText.charAt(i);
						if (formattedText.substring(i).startsWith(&#39;&lt;a href=&#39;) || formattedText.substring(i).startsWith(&#39;&lt;br&gt;&#39;) || formattedText.substring(i).startsWith(&#39;&lt;strong&gt;&#39;)) {
							var tagEnd = formattedText.indexOf(&#39;&gt;&#39;, i) + 1;
							charToAdd = formattedText.substring(i, tagEnd);
							i = tagEnd;
						} else if (formattedText.charAt(i) === &#39;&lt;&#39;) {
							var tagEnd = formattedText.indexOf(&#39;&gt;&#39;, i) + 1;
							charToAdd = formattedText.substring(i, tagEnd);
							i = tagEnd - 1;
						}
						message.append(charToAdd);
						i++;
						setTimeout(typeWriter, speed);
					} else {
						var copyIcon = $(&#39;&lt;div class=&quot;copyIcon&quot;&gt;ðŸ“‹&lt;/div&gt;&#39;).appendTo(container);
						copyIcon.click(function() {
							var textToCopy = message.text();
							navigator.clipboard.writeText(textToCopy).then(function() {
								alert(&#39;Text copied to clipboard!&#39;);
							}, function(err) {
								console.error(&#39;Could not copy text: &#39;, err);
							});
						});

						var regenerateIcon = $(&#39;&lt;div class=&quot;regenerateIcon&quot;&gt;&amp;#x1F501;&lt;/div&gt;&#39;).appendTo(container);
						regenerateIcon.click(function() {
							generateText(true); // Call generateText with regenerate flag set to true
						});
					}
				}

				typeWriter();
			}

			function formatResponseText(text) {
				text = text.replace(/(https?:\/\/[^\s]+)/g, &#39;&lt;a href=&quot;$1&quot; target=&quot;_blank&quot;&gt;$1&lt;/a&gt;&#39;);
				text = text.replace(/^##\s?(.+)/gm, &#39;&lt;strong&gt;$1&lt;/strong&gt;&#39;);
				text = text.replace(/^(\s*(?:-|\*|\d+\.)\s+.+)$/gm, &#39;$1&lt;br&gt;&#39;);
				return text;
			}
		&lt;/script&gt;
		&lt;style&gt;
			.regenerateIcon,
			.copyIcon {
				cursor: pointer;
				display: inline-block;
				margin-left: 10px;
				font-size: 20px;
				/* Adjust size as needed */
			}

			.userMessage .message {
				background-color: #e2f0cb;
			}

			#progressOverlay {
				display: none;
				/* Initially hidden */
				position: fixed;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				background: rgba(0, 0, 0, 0.5);
				z-index: 1000;
			}

			#progressOverlay &gt; div {
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -50%);
				color: white;
				font-size: 20px;
			}
		&lt;/style&gt;
		&lt;div id=&quot;progressOverlay&quot;&gt;
			&lt;div&gt;Thinking...&lt;/div&gt;
		&lt;/div&gt;

	&lt;/body&gt;

&lt;/html&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;http://gdnetworkjob2013.blogspot.com/&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://gdnetworkjob2013.blogspot.com/feeds/3240438329656346955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://gdnetworkjob2013.blogspot.com/2026/04/chatgpt-like-text-generation-div.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/351024856889166003/posts/default/3240438329656346955'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/351024856889166003/posts/default/3240438329656346955'/><link rel='alternate' type='text/html' href='https://gdnetworkjob2013.blogspot.com/2026/04/chatgpt-like-text-generation-div.html' title=''/><author><name>}}}}Get yuer Dreem{{{{</name><uri>http://www.blogger.com/profile/06857196246338152083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>